Skip to content

Commit

Permalink
if options are being merged with json, we cannot use the splat (`…
Browse files Browse the repository at this point in the history
…**`) - `Error: no parameter named 'json'`
  • Loading branch information
GrantBirki committed Jan 20, 2025
1 parent 67b0d70 commit 0abddcf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/octokit/client/reactions.cr
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ module Octokit
# ```
def create_commit_comment_reaction(repo : String, id : Int64, reaction : String, **options) : Reaction
options = options.merge({json: {content: reaction}})
Reaction.from_json(post("#{Repository.path(repo)}/comments/#{id}/reactions", **options))
Reaction.from_json(post("#{Repository.path(repo)}/comments/#{id}/reactions", options))
end

# List reactions for an issue
Expand Down Expand Up @@ -75,7 +75,7 @@ module Octokit
# ```
def create_issue_reaction(repo : String, number : Int64, reaction : String, **options) : Reaction
options = options.merge({json: {content: reaction}})
Reaction.from_json(post("#{Repository.path(repo)}/issues/#{number}/reactions", **options))
Reaction.from_json(post("#{Repository.path(repo)}/issues/#{number}/reactions", options))
end

# List reactions for an issue comment
Expand Down Expand Up @@ -109,7 +109,7 @@ module Octokit
# ```
def create_issue_comment_reaction(repo : String, id : Int64, reaction : String, **options) : Reaction
options = options.merge({json: {content: reaction}})
Reaction.from_json(post("#{Repository.path(repo)}/issues/comments/#{id}/reactions", **options))
Reaction.from_json(post("#{Repository.path(repo)}/issues/comments/#{id}/reactions", options))
end

# Delete a reaction from an issue comment
Expand Down Expand Up @@ -152,7 +152,7 @@ module Octokit
# ```
def create_pull_request_review_comment_reaction(repo : String, id : Int64, reaction : String, **options) : Reaction
options = options.merge({json: {content: reaction}})
Reaction.from_json(post("#{Repository.path(repo)}/pulls/comments/#{id}/reactions", **options))
Reaction.from_json(post("#{Repository.path(repo)}/pulls/comments/#{id}/reactions", options))
end

# Delete a reaction
Expand Down Expand Up @@ -195,7 +195,7 @@ module Octokit
# ```
def create_release_reaction(repo : String, release_id : Int64, reaction : String, **options) : Reaction
options = options.merge({json: {content: reaction}})
Reaction.from_json(post("#{Repository.path(repo)}/releases/#{release_id}/reactions", **options))
Reaction.from_json(post("#{Repository.path(repo)}/releases/#{release_id}/reactions", options))
end

# Delete a reaction for a release
Expand Down

0 comments on commit 0abddcf

Please sign in to comment.