Skip to content

Commit

Permalink
add token scope requirements to Reactable.add/remove_reaction
Browse files Browse the repository at this point in the history
also a warning about remove_reaction raising FORBIDDEN for fun
  • Loading branch information
ShineyDev committed Jan 24, 2025
1 parent 9dda3af commit d814fa9
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions github/interfaces/reactable.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,13 @@ async def add_reaction(
Adds a reaction to the reactable.
.. note::
This mutation requires the following token scopes:
- ``public_repo`` (on a :class:`~github.RepositoryNode`)
- ``write:discussions`` (on a :class:`~github.TeamDiscussion` or a :class:`~github.TeamDiscussionComment`)
.. note::
Expand Down Expand Up @@ -206,6 +213,20 @@ async def remove_reaction(
Removes a reaction from the reactable.
.. note::
This mutation requires the following token scopes:
- ``public_repo`` (on a :class:`~github.RepositoryNode`)
- ``write:discussions`` (on a :class:`~github.TeamDiscussion` or a :class:`~github.TeamDiscussionComment`)
.. warning::
For reasons beyond my comprehension, this mutation will
raise FORBIDDEN when the reaction you attempt to remove
does not exist, despite having the required permission.
.. note::
Expand Down

0 comments on commit d814fa9

Please sign in to comment.