Skip to content
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

Add permissions to the Assign New PR action #4223

Merged

Conversation

StephanTLavavej
Copy link
Member

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 use actions/github-script but don't directly mention GITHUB_TOKEN so I don't know if they're affected.

.github/workflows/update-status-chart.yml mentions github.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.

@StephanTLavavej StephanTLavavej added the infrastructure Related to repository automation label Dec 1, 2023
@StephanTLavavej StephanTLavavej requested a review from a team as a code owner December 1, 2023 02:07
@CaseyCarter CaseyCarter removed their assignment Dec 6, 2023
@StephanTLavavej StephanTLavavej self-assigned this Dec 7, 2023
@StephanTLavavej
Copy link
Member Author

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@StephanTLavavej StephanTLavavej merged commit c86e981 into microsoft:main Dec 7, 2023
@StephanTLavavej StephanTLavavej deleted the github-actions-permissions branch December 7, 2023 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Related to repository automation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants