GHPullRequest isn't reactable
Describe the bug
Trying to call Reactable.createAction(...) on a GHPullRequest throws a Not Found error.
To Reproduce Steps to reproduce the behavior:
- Create a valid
GHPullRequestinstance - Call the method
createActionon that instance
Expected behavior
Not really certain. The URL the the client is trying to access: https://api.github.com/repos/OWNER/REPO/pulls/PR_NUMBER/reactions doesn't really exist so either:
- The
GHPullRequestshouldn't be marked asReactableor; - The
GHPullRequestshould be calling thehttps://api.github.com/repos/OWNER/REPO/issues/ISSUE_NUMBER/reactionsinstead assuming it yields desired result
Desktop (please complete the following information):
- OS: any
- Browser N/A
- Version 1.317 though earlier versions might also be affected
Additional context
@jmadureira make sure you have the required permissions, github api also returns 404s in case you don't have the required permissions
Hi @Haarolean. I ended up enabling all permissions just in case and still got the same error. The URL the client is trying to access is not listed anywhere in the Github documentation (at least I'm not able to find it).
You're totally right, there's a bug here. Pull requests should use the issues endpoint to create reactions (as pull requests are indeed issues with additional stuff).
I created https://github.com/hub4j/github-api/pull/1808 to fix it.