State correct permissions for requesting a reviewer via the API #35057
Labels
content
This issue or pull request belongs to the Docs Content team
needs SME
This proposal needs review from a subject matter expert
rest
Content related to rest - overview.
waiting for review
Issue/PR is waiting for a writer's review
Code of Conduct
What article on docs.github.com is affected?
https://docs.github.com/en/rest/pulls/review-requests?apiVersion=2022-11-28#request-reviewers-for-a-pull-request
What part(s) of the article would you like to see updated?
The docs for this request say that the only required permission for this request is
pull-requests:write
. When I tried to request a review from a team using an app with this permission scope, I got the following error message, which was quite obscure, only vaguely hinting that it might be trying to validate a team slug."errorMessage": "Validation Failed: \"Could not resolve to a node with the global id of 'BUNCH_OF_RANDOM_CHARACTERS'
.I fixed this by applying the permission
members:read
to the GitHub App making the request, and I think it would be helpful to amend the docs to state that this permission is required for the request to succeed. I think it also might be be useful to indicate that the object that has failed to validate is the team slug, if that is the source of the error (which is just an educated guess)Additional information
Please see the following screenshot
The text was updated successfully, but these errors were encountered: