Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

State correct permissions for requesting a reviewer via the API #35057

Open
1 task done
NovemberTang opened this issue Oct 23, 2024 · 6 comments
Open
1 task done

State correct permissions for requesting a reviewer via the API #35057

NovemberTang opened this issue Oct 23, 2024 · 6 comments
Labels
content This issue or pull request belongs to the Docs Content team rest Content related to rest - overview. SME reviewed An SME has reviewed this issue/PR

Comments

@NovemberTang
Copy link

NovemberTang commented Oct 23, 2024

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

Screenshot 2024-10-23 at 21 04 41
@NovemberTang NovemberTang added the content This issue or pull request belongs to the Docs Content team label Oct 23, 2024
@github-actions github-actions bot added the triage Do not begin working on this issue until triaged by the team label Oct 23, 2024
@nguyenalex836 nguyenalex836 added waiting for review Issue/PR is waiting for a writer's review rest Content related to rest - overview. and removed triage Do not begin working on this issue until triaged by the team labels Oct 23, 2024
@nguyenalex836
Copy link
Contributor

@NovemberTang Thank you for raising this issue! I'll get this triaged for review ✨ Our team will provide feedback regarding the best next steps for this issue - thanks for your patience! 💛

@Jpplabon

This comment was marked as spam.

@Jpplabon

This comment was marked as spam.

@subatoi subatoi added the needs SME This proposal needs review from a subject matter expert label Oct 28, 2024
Copy link
Contributor

Thanks for opening an issue! We've triaged this issue for technical review by a subject matter expert 👀

@TIMBER2024

This comment was marked as spam.

@nguyenalex836
Copy link
Contributor

@NovemberTang Hello! 👋 Thank you so much for your patience while our SME team reviewed. They agree with your assessment, and that logically it makes sense members:read would be needed 💛

Would you be open to raising a PR to amend our docs? If not, no problem at all - we can open this to the community ✨

@nguyenalex836 nguyenalex836 added SME reviewed An SME has reviewed this issue/PR and removed waiting for review Issue/PR is waiting for a writer's review needs SME This proposal needs review from a subject matter expert labels Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content This issue or pull request belongs to the Docs Content team rest Content related to rest - overview. SME reviewed An SME has reviewed this issue/PR
Projects
None yet
Development

No branches or pull requests

6 participants
@subatoi @NovemberTang @nguyenalex836 @TIMBER2024 @Jpplabon and others