mirror of
https://github.com/status-im/PyGithub.git
synced 2026-09-02 11:51:10 +00:00
Do not check reaction_type before sending (#1592)
There is a bunch of repeated code checking reactions which has the issue that it can easily get out of date with what GitHub accepts. Drop the check, and rely on GitHub returning an error. Fixes #1554
This commit is contained in:
@@ -211,16 +211,7 @@ class PullRequestComment(github.GithubObject.CompletableGithubObject):
|
||||
:param reaction_type: string
|
||||
:rtype: :class:`github.Reaction.Reaction`
|
||||
"""
|
||||
assert isinstance(reaction_type, str), "reaction type should be a string"
|
||||
assert reaction_type in [
|
||||
"+1",
|
||||
"-1",
|
||||
"laugh",
|
||||
"confused",
|
||||
"heart",
|
||||
"hooray",
|
||||
], "Invalid reaction type (https://developer.github.com/v3/reactions/#reaction-types)"
|
||||
|
||||
assert isinstance(reaction_type, str), reaction_type
|
||||
post_parameters = {
|
||||
"content": reaction_type,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user