Add permissions to the Assign New PR action #4223
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As a Microsoft-owned repo, the default permissions for our
GITHUB_TOKEN
are going to change in the near future, so we need to begin explicitly granting what permissions we need.After looking at the API calls in srggrs/assign-one-project-github-action and reading GitHub's permissions documentation, I'm 70% confident that
repository-projects: write
is what we need. Note that I am unable to test this PR (because my fork doesn't have any Classic Projects and GitHub frustratingly won't let me create them anymore)..github/workflows/move-ready-for-review-prs.yml
and.github/workflows/move-work-in-progress-prs.yml
useactions/github-script
but don't directly mentionGITHUB_TOKEN
so I don't know if they're affected..github/workflows/update-status-chart.yml
mentionsgithub.token
for the GraphQL API, but all it needs is public read-only access, so I don't think that it'll need to be changed.