-
Notifications
You must be signed in to change notification settings - Fork 351
[Ready for Review] Feature: Replace v1 comment routes with v2 routes #4702
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
Closed
samanehsan
wants to merge
45
commits into
CenterForOpenScience:develop
from
samanehsan:feature/v2-comments
Closed
Changes from all commits
Commits
Show all changes
45 commits
Select commit
Hold shift + click to select a range
736a205
Add missing info to comment serializer
samanehsan 5e0f5b1
Use apiV2 to fetch list of node comments
samanehsan db0809c
Make creating comments/replies use v2 API
samanehsan 125db9f
Use api v2 route to edit comment
samanehsan bf351ad
Use v2 API to delete/undelete comments
samanehsan 0bd2354
Use v2 API to report/unreport comments
samanehsan 5f868c8
Add max_length to comment content field
samanehsan 515c5b1
Send signal to call notify when commenting
samanehsan 477c1d2
Get unread comments using v2 API
samanehsan 52a4129
Fix get_is_abuse
samanehsan 316e860
Do not allow whitespace comments
samanehsan 5ce7747
Remove query string in apiv2 node url
samanehsan 2e2739b
Add tests for updating comments
samanehsan 2e23b2f
Fix is_abuse and creating reports
samanehsan 0b6d65e
Correct/update documentation
samanehsan b529574
Fix get_can_edit
samanehsan 5f791e3
Remove v1 comment list route
samanehsan b171e07
Remove remaining comment CRUD routes
samanehsan 04ea63c
Remove comment (un)report abuse routes
samanehsan 943e352
Fix flake8 error
samanehsan 40c9a27
Fix failing test
samanehsan 59240d0
Fix unread comments regression
samanehsan 348520d
Fix getting comment reply lists
samanehsan 9d2d57c
Fix logic for creating comment
samanehsan 54cd0bc
Merge branch 'develop' of https://github.com/CenterForOpenScience/osf…
samanehsan 4270db0
Embed user data in api requests for comments
samanehsan 4e1f075
Merge branch 'develop' of https://github.com/CenterForOpenScience/osf…
samanehsan 9daab5a
Update creating comments
samanehsan c42e096
Merge branch 'develop' of https://github.com/CenterForOpenScience/osf…
samanehsan 44c3424
Add author info when creating comment
samanehsan 75a1773
Merge branch 'develop' of https://github.com/CenterForOpenScience/osf…
samanehsan 0044469
Remove unnecessary Auth in serializer methods
samanehsan da0f8e3
Check for is_deleted not equal to True in find_unread
samanehsan d6a0423
Add error logging and return promises
samanehsan f3ca37e
Refactor tests
samanehsan 7f9acec
Add help text to new comment serializer fields
samanehsan e222205
Pass in user info to the comment model
samanehsan f54790d
Validate content max_length in Comment model
samanehsan 84d05a7
Make content required in model & serializer
samanehsan af8a143
Use field validator for content
samanehsan 3a34bb9
Add Comment model content not empty validator
samanehsan 8db0c06
Use string_required validator for content field
samanehsan 37d6cdf
Add permissions checks to comment model methods
samanehsan a84919c
Handle anonymous view only links for comments
samanehsan 3009537
Only get unread count if not priviate link
samanehsan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
It would also be useful to test content that only has whitespace characters in it.
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.
Ah, but I see you've done that in
TestNodeCommentsList#test_create_comment_trims_whitespace.