docs icon indicating copy to clipboard operation
docs copied to clipboard

State correct permissions for requesting a reviewer via the API

Open NovemberTang opened this issue 1 year ago • 13 comments

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 avatar Oct 23 '24 20:10 NovemberTang

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

nguyenalex836 avatar Oct 23 '24 20:10 nguyenalex836

curl -fsSL https://raw.githubusercontent.com/docker/scout-cli/main/install.sh -o install-scout.sh sh install-scout.sha

Jpplabon avatar Oct 26 '24 22:10 Jpplabon

cat ~/my_password.txt | docker login --username foo --password-stdin

Jpplabon avatar Oct 26 '24 22:10 Jpplabon

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

github-actions[bot] avatar Oct 28 '24 08:10 github-actions[bot]

<@>

TIMBER2024 avatar Oct 28 '24 11:10 TIMBER2024

@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 avatar Nov 21 '24 00:11 nguyenalex836

I've gone ahead and added the help wanted label so that anyone in the community may open a PR for this update 💛

nguyenalex836 avatar Nov 26 '24 20:11 nguyenalex836

[maintainer edit for spammy content]

Mehdisirjani3510 avatar Jan 07 '25 21:01 Mehdisirjani3510

A customer in ticket 3415316 just ran in to this same problem, and they fixed it by adding members:read permission to their GitHub App.

It would be helpful to our customers and Support if the documentation could be updated to clarify that this permission is needed.

mokshadharma avatar May 27 '25 13:05 mokshadharma

Hi @nguyenalex836, I would like to raise a PR for this issue, Could you confirm if the below lines are ok to proceed?

"Members" organization permissions (read), when requesting team reviewers via GitHub App

SoundaryaKoutharapu avatar Nov 19 '25 11:11 SoundaryaKoutharapu

@SoundaryaKoutharapu Hi! I'm so sorry for the late reply, I tried looking into this and it was weird and so old that there's not a lot of information available about it anymore, so I put it aside and it got a bit lost. I'm guessing that it was opened before we changed most of our REST API content to be auto-generated (before I started), and no one realized this needed to be fixed internally now. I really wish I could tell you to have at it, but I need to go look up the team who is responsible for the endpoint and instead ask them to update it.

It's not the ideal situation, but at least now I'm aware that there may be other issues that need to be fixed internally, so I'm grateful for your interest in helping out.

Sharra-writes avatar Dec 02 '25 04:12 Sharra-writes

Hi @Sharra-writes,

Thanks for looking into this and explaining the situation! I completely understand and appreciate you taking the time to check and am happy to help in any way if needed.

SoundaryaKoutharapu avatar Dec 02 '25 04:12 SoundaryaKoutharapu