-
Notifications
You must be signed in to change notification settings - Fork 249
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
What pemission scopes does the action need for the generated GITHUB_TOKEN
?
#220
Comments
Quite frankly - I'm not entirely sure. Those permissions are always confusing to me. Especially since they don't correspond 1 to 1 to the permissions for the workflow jobs. What we need is:
This would be definitely useful information to have in the docs but it requires some experimentation to figure out which minimal combination of those scopes would allow the action to function properly.
You can create a new "bot"-like account, limit its access to a particular repo and generate PAT for that account. |
You can find the required permissions by looking up the REST endpoints in Permissions required for fine-grained personal access tokens. Edit: Hm, these don't look like the ones in the screenshot. But see section below.
You should look into Fine-grained PATs. You can scope them by repository. |
To summarize, the permissions required are:
If you don't publish using Changesets, Releases is not required although it falls inside of the Contents category |
For anyone thinking of using fine-grained tokens, be aware that they don't currently support the GraphQL API, which is required for
|
I'm using those in XState and it works fine (but I don't use the GraphQL API there): I'd appreciate it if somebody could prepare a PR documenting this. |
@Andarist ah sorry! I'm so used to the GitHub changelogs that I forgot it's not the default configuration. I've edited my comment to be more accurate. Thanks for the clarification! |
@ernestognw Is this using the fine-grained tokens? I haven't been able to get this to work with just those 2 read/write permissions. |
I can confirm that these permissions work as expected. I struggled to get the token recognised. As seen in some other issues, adding the PAT token as part of the GitHub checkout action solved my problem. |
@kenneth-gray did you get this working by not using the |
* 🐛 pin pnpm version in workflows * 🐛 github release workflows require permissions changesets/action#220 (comment) * 📝 update release note
Hello there, hope everything is fine
I was wondering which permission scopes should I grant for the PAT (personal access token) of changesets action.
Below is the list of permission scopes available for PATs, I have some ambiguity to choose some of them.
And there's also some problem with this approach of giving PAT as
github_token
to the action, since the PAT gives access to all repos and you can't limit the scope.Isn't there any better approach for that?
The text was updated successfully, but these errors were encountered: