{
message: 'Resource not accessible by personal access token',
documentation_url: 'https://docs.github.com/rest/pulls/pulls#create-a-pull-request',
status: '403'
}
According to the GitHub REST API docs, fine-grained tokens only require "Pull request" write access for this
This endpoint works with the following fine-grained token types:
The fine-grained token must have the following permission set:
"Pull requests" repository permissions (write)
Yet, even with a Fine-grained token with full read-write to repo/org and access to all repos, we could continually get a 403 error.
![image](https://github.com/user-attachments/assets/9b1aca16-ab7b-4a28-9391-0af8ad7b9bc8)
Note: this was also tried with multiple users as the `Resource owner`
![image](https://github.com/user-attachments/assets/3e3b51f2-78ef-48d7-899b-abdcbd38110d)
![image](https://github.com/user-attachments/assets/6baf0f38-9ac8-4c5d-804b-847216c6d4e5)
I have also replicated this using a VSCode Extension, Thunder Client, with updated headers as per GitHub docs
tl:dr -
fine-grained
tokens result in403
, usingclassic
token insteadWhen creating a PR via
https://github.com/RoamJS/roamjs-components/blob/a03b1b802d67a9d24d4822aa3d5a504fab7e0a1e/src/scripts/publishToRoamDepot.ts#L146-L157
Where
owner
= RoamJSbranch
= query-builderWe have been continually getting the following error (latest run with error)
According to the GitHub REST API docs, fine-grained tokens only require "Pull request" write access for this
Yet, even with a Fine-grained token with full read-write to repo/org and access to all repos, we could continually get a 403 error.
I have also replicated this using a VSCode Extension, Thunder Client, with updated headers as per GitHub docs
Others have also reported this issue: https://github.com/orgs/community/discussions/106661 https://github.com/orgs/community/discussions/123362