Skip to content

Commit

Permalink
Add permissions on jobs creating PR
Browse files Browse the repository at this point in the history
  • Loading branch information
chouetz committed Aug 28, 2024
1 parent 562ffc1 commit cb791a4
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/add_milestone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
name: Add Milestone on PR
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
permissions:
pull-requests: write
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/backport-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
&& contains(github.event.label.name, 'backport')
)
)
permissions:
contents: write
steps:
- uses: actions/create-github-app-token@31c86eb3b33c9b601a1f60f98dcbfd1d70f379b4 # v1.10.3
id: app-token
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/create_rc_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ jobs:
create_rc_pr:
runs-on: ubuntu-latest
needs: find_release_branches
permissions:
contents: write # push commit and branch
pull-requests: write
strategy:
matrix:
value: ${{fromJSON(needs.find_release_branches.outputs.branches)}}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cws-btfhub-sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ jobs:
combine:
needs: generate
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout datadog-agent repository
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/label-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
assign-team-label:
if: github.triggering_actor != 'dd-devflow[bot]'
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Checkout repository
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
Expand Down

0 comments on commit cb791a4

Please sign in to comment.