Skip to content

Commit

Permalink
Fix github actions permissions (#2842)
Browse files Browse the repository at this point in the history
As inspired by DataDog/dd-trace-dotnet#5728.

Signed-off-by: Bob Weinand <[email protected]>
  • Loading branch information
bwoebi authored Sep 6, 2024
1 parent f216f32 commit 98839cf
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/auto_add_pr_to_miletone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ jobs:
add_to_milestone:
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.title, '[Version Bump]') == false
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write # need to modify existing PR
issues: write # need to potentially create a new milestone

steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/auto_check_snapshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
jobs:
check-snapshots:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write # need to add a comment to a PR

steps:
- name: Checkout
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/auto_label_prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ jobs:
add-labels:

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

steps:
- name: Checkout
Expand Down

0 comments on commit 98839cf

Please sign in to comment.