Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OAuth Scope required for Creating Github pull requests with Personal Access Token

I need to create documentation giving instructions to generate a Personal Access Token that will only need to create Pull Requests on Github.

I've read the documentation describing the various OAuth scopes, but it is still not clear to me which OAuth scope(s) I need to select in order to be able create a Pull Request.

What OAuth scope(s) need to be selected for users to be able to create Pull Requests?

like image 894
Joel no not that Joel Avatar asked Aug 08 '26 11:08

Joel no not that Joel


2 Answers

From https://docs.github.com/en/rest/reference/pulls#create-a-pull-request:

To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request.

like image 145
Martin Bean Avatar answered Aug 10 '26 10:08

Martin Bean


The repos scope should be needed.

And, with the GitHub CLI gh v2.22.0 (Jan. 2023), you can search from within your local cloned GitHub repository:

See gh auth status --show-token: it will display the auth token you are using.

https://user-images.githubusercontent.com/1149246/199130513-abc96787-dd3c-42db-abe1-e11e9603066a.png

like image 29
VonC Avatar answered Aug 10 '26 11:08

VonC



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!