Skip to content

[main] Grant GitHub actions explicit permissions #38420

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

Merged
merged 1 commit into from
Nov 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ on:
issue_comment:
types: [created]

permissions:
contents: write
issues: write
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need issues permission to write comments into the original PR (where a user started this workflow)

pull-requests: write

jobs:
backport:
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/backport to')
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/runtime-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ on:
# Once per day at midnight PST (8 UTC)
- cron: '0 8 * * *'

permissions:
contents: write
issues: write
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need issues permission to update #18943 when we're out-of-sync

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does contents control? Branches?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does contents control? Branches?

As far as we know, that's right. See discussion in dotnet/runtime#61626. I'm imitating that plus dotnet/runtime#61637 in this PR.

pull-requests: write

jobs:
compare_repos:
# Comment out this line to test the scripts in a fork
Expand Down