Skip to content

Commit

Permalink
feat: add missing method delete_issue_comment_reaction() (#1734)
Browse files Browse the repository at this point in the history
* add missing `delete_issue_comment_reaction` reactions method

* add unit tests
  • Loading branch information
GrantBirki authored Jan 21, 2025
1 parent cc7d142 commit fbcea34
Show file tree
Hide file tree
Showing 3 changed files with 679 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lib/octokit/client/reactions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,22 @@ def create_issue_comment_reaction(repo, id, reaction, options = {})
post "#{Repository.path repo}/issues/comments/#{id}/reactions", options
end

# Delete a reaction from an issue comment
#
# @param repo [Integer, String, Hash, Repository] A GitHub repository
# @param comment_id [Integer] The Issue comment id
# @param reaction_id [Integer] The Reaction id
#
# @see https://docs.github.com/en/rest/reactions/reactions#delete-an-issue-comment-reaction
#
# @example
# @client.delete_issue_comment_reaction("octokit/octokit.rb", 1, 2)
#
# @return [Boolean] Return true if reaction was deleted, false otherwise.
def delete_issue_comment_reaction(repo, comment_id, reaction_id, options = {})
boolean_from_response :delete, "#{Repository.path repo}/issues/comments/#{comment_id}/reactions/#{reaction_id}", options
end

# List reactions for a pull request review comment
#
# @param repo [Integer, String, Hash, Repository] A GitHub repository
Expand Down
Loading

0 comments on commit fbcea34

Please sign in to comment.