Skip to content

Commit

Permalink
Merge branch 'master' into AO3-6761-admins-tag-wranglings-controller
Browse files Browse the repository at this point in the history
  • Loading branch information
brianjaustin committed Nov 10, 2024
2 parents 1c74b21 + 766898d commit 81fb915
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 3 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/automated-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,22 @@ jobs:
arguments: db:otwseed
- command: rspec
arguments: spec/controllers
imagemagick: true
- command: rspec
arguments: spec/models
imagemagick: true
- command: rspec
arguments: --exclude-pattern 'spec/{controllers,models}/**/*.rb'
imagemagick: true
- command: cucumber
arguments: features/admins
imagemagick: true
- command: cucumber
arguments: features/bookmarks
imagemagick: true
- command: cucumber
arguments: features/collections
imagemagick: true
- command: cucumber
arguments: features/comments_and_kudos
- command: cucumber
Expand All @@ -73,8 +79,10 @@ jobs:
vcr: true
- command: cucumber
arguments: features/other_a
imagemagick: true
- command: cucumber
arguments: features/other_b
imagemagick: true
- command: cucumber
arguments: features/prompt_memes_a
- command: cucumber
Expand All @@ -92,6 +100,7 @@ jobs:
- command: cucumber
arguments: features/works
ebook: true
imagemagick: true

steps:
- name: Check out code
Expand Down Expand Up @@ -129,6 +138,10 @@ jobs:
restore-keys: |
cassette-library-${{ hashFiles(matrix.tests.arguments) }}-
- name: Install imagemagick for image processing
if: ${{ matrix.tests.imagemagick }}
run: sudo apt-get install -y imagemagick

- name: Set up Ruby and run bundle install
uses: ruby/setup-ruby@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
bundler-cache: true

- name: rubocop
uses: reviewdog/action-rubocop@d89ceac67134c1587b4bc0ad8b55007c533c9c3f
uses: reviewdog/action-rubocop@5e23bb67d79c93e5eb45bdae6d08b04052afec35
with:
use_bundler: true
reporter: github-pr-check
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ and a [list of Known Issues](https://archiveofourown.org/known_issues) for
publicly editable.

If you need help using the site, or want to report an issue you have found,
please [contact the AO3 Support team](https://archiveofourown.org/support).
please [contact the AO3 Support team](https://archiveofourown.org/support). Our Support team is staffed by volunteers, so please wait for a response before submitting another ticket. Duplicate submissions will not make things happen faster.


## Reporting security issues
Expand All @@ -25,7 +25,7 @@ official OTW volunteers, please feel free to make changes!

## Suggesting new features

Please [contact the AO3 Support team](https://archiveofourown.org/support).
Please [contact the AO3 Support team](https://archiveofourown.org/support). Our Support team is staffed by volunteers, so please wait for a response before submitting another ticket. Duplicate submissions will not make things happen faster.


## Contributing code
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ We welcome pull requests for bugs described in our issue tracker. Please see our
* [Developer Documentation](https://github.com/otwcode/otwarchive/wiki)
* [Commit Policy](https://github.com/otwcode/otwarchive/wiki/Commit-policy)

We do not have a public chat, but you are welcome to contact us at [email protected] if you have any questions.

API
----------
There is currently no API for the OTW-Archive software. While it is something we're considering for the future, we ask that contributors instead focus on issues already in our [Jira issue tracker](https://otwarchive.atlassian.net/).
Expand Down
10 changes: 10 additions & 0 deletions app/models/tag.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1188,6 +1188,16 @@ def update_tag_nominations
parent_names << "" if parent_names.present?

TagNomination.where(tagname: name, parent_tagname: parent_names).update_all(parented: true)

return unless saved_change_to_name? && name_before_last_save.present?

# Act as if the tag with the previous name was deleted and mirror clear_tag_nominations
TagNomination.where(tagname: name_before_last_save).update_all(
canonical: false,
exists: false,
parented: false,
synonym: nil
)
end

before_destroy :clear_tag_nominations
Expand Down
16 changes: 16 additions & 0 deletions features/tag_sets/tag_set_nominations.feature
Original file line number Diff line number Diff line change
Expand Up @@ -322,3 +322,19 @@ Feature: Nominating and reviewing nominations for a tag set
And I should not see "Someone else has already nominated the tag for this set but in fandom First."
And I should not see "Gold"
And I should see "None nominated in this fandom."

Scenario: A nominated canonical tag can be renamed by a tag wrangling admin without affecting the nomination
Given a canonical character "Before" in fandom "Treasure Chest"
And I am logged in as "tagsetter"
And I set up the nominated tag set "Nominated Tags" with 1 fandom nom and 1 character nom
And I nominate fandom "Treasure Chest" and character "Before" in "Nominated Tags" as "tagsetter"
When I am logged in as an "tag_wrangling" admin
And I edit the tag "Before"
And I fill in "Name" with "After"
And I press "Save changes"
Then I should see "Tag was updated."
When I am logged in as "tagsetter"
And I go to the "Nominated Tags" tag set page
And I follow "My Nominations"
Then I should see "Treasure Chest"
And I should see "Before"

0 comments on commit 81fb915

Please sign in to comment.