Skip to content

Commit 98839cf

Browse files
authored
Fix github actions permissions (#2842)
As inspired by DataDog/dd-trace-dotnet#5728. Signed-off-by: Bob Weinand <[email protected]>
1 parent f216f32 commit 98839cf

3 files changed

Lines changed: 12 additions & 0 deletions

File tree

.github/workflows/auto_add_pr_to_miletone.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ jobs:
1111
add_to_milestone:
1212
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.title, '[Version Bump]') == false
1313
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
pull-requests: write # need to modify existing PR
17+
issues: write # need to potentially create a new milestone
18+
1419
steps:
1520
- name: Checkout
1621
uses: actions/checkout@v2

.github/workflows/auto_check_snapshots.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
jobs:
77
check-snapshots:
88
runs-on: ubuntu-latest
9+
permissions:
10+
contents: read
11+
pull-requests: write # need to add a comment to a PR
912

1013
steps:
1114
- name: Checkout

.github/workflows/auto_label_prs.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ jobs:
77
add-labels:
88

99
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
issues: write # Update labels on PRs (might not be necessary, but we call the UpdateIssue API so...)
13+
pull-requests: write # Update labels on PRs
1014

1115
steps:
1216
- name: Checkout

0 commit comments

Comments
 (0)