-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[EOSF-885] Review action rename #329
[EOSF-885] Review action rename #329
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please describe these changes in CHANGELOG.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯 Looks great! We'll wait to merge until we're sure moderation changes are ready.
- Rename `action` model to `review-action` | ||
- Also rename related adapter, serializer and tests | ||
- Added model tests for `review-action` | ||
- Customize model adapter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect. Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adlius @jamescdavis can you update the relationship on the user too?
https://github.com/adlius/ember-osf/blob/reviewActionRename/addon/models/user.js#L40
@laurenbarker Oops, I keep forgetting there is a user relationship! Sorry about that! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update user action relationship as well.
A PR is coming up shortly. |
Thank you! |
Rename completed. Since I touched the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for updating the user/review-action relation and adding user model tests!
tests/unit/models/user-test.js
Outdated
assert.equal(relationship.key, 'reviewActions'); | ||
assert.equal(relationship.type, 'review-action'); | ||
assert.equal(relationship.kind, 'hasMany'); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for adding all these!
@adlius @jamescdavis, sorry for the flip flop. It looks like the user's review-actions relationship doesn't exist anymore so it can be removed from the model. |
6e753ea
to
f40dd66
Compare
@laurenbarker PR is updated to remove the review-action relationship for user and its respective model test. |
Passing build: https://travis-ci.org/adlius/ember-osf/builds/319232973 |
Still passing: https://travis-ci.org/adlius/ember-osf/builds/319331940 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Purpose
OSF-8876 modifies the action API endpoint. This PR renames the Ember model from
action
toreview-action
and add tests for the changed model. There is another PR forember-osf-preprints
repo for some minor changes.Summary of Changes
adapters/review-action.js
, the default behavior of the adapter is overridden with apathForType
function, since the API endpoint for review action inquiry is changed from/v2/actions/
to/v2/actions/reviews
.review-action
model.Side Effects / Testing Notes
None
Ticket
https://openscience.atlassian.net/browse/EOSF-885
Reviewer Checklist
CHANGELOG.md