[12.1] Add missing award emoji methods to MergeRequests#860
Open
antonkomarev wants to merge 1 commit intoGitLabPHP:12.0from
Open
[12.1] Add missing award emoji methods to MergeRequests#860antonkomarev wants to merge 1 commit intoGitLabPHP:12.0from
antonkomarev wants to merge 1 commit intoGitLabPHP:12.0from
Conversation
08a05e4 to
4f6aebd
Compare
4f6aebd to
413912a
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds the missing
award_emojiwrite/read endpoints toGitlab\Api\MergeRequests— both for the merge request itselfand for its notes:
addAwardEmoji().../merge_requests/:iid/award_emojishowNoteAwardEmoji().../merge_requests/:iid/notes/:note_id/award_emojiaddNoteAwardEmoji().../merge_requests/:iid/notes/:note_id/award_emojiremoveNoteAwardEmoji().../merge_requests/:iid/notes/:note_id/award_emoji/:award_idExisting
awardEmoji()(GET list) andremoveAwardEmoji()(DELETE)already covered the read/remove side for the MR itself, but there
was no way to actually add an emoji — and nothing at all for notes.
Naming follows the existing conventions on this class:
show*for single-resource reads (showNote(),showDiscussion())add*/remove*for writes (addNote(),removeNote())GitLab uses a flat
/notes/:note_id/award_emojipath, so the notemethods also cover reactions on discussion thread comments —
callers just pass the
note_idof the discussion note.Reference: https://docs.gitlab.com/api/emoji_reactions/
Resurrects #794 (closed as stale after a request for test coverage);
this PR adds the missing tests and
removeNoteAwardEmoji()forsymmetry.