Skip to content

Commit

Permalink
Add permissions section
Browse files Browse the repository at this point in the history
  • Loading branch information
maxkrivich authored Aug 2, 2023
1 parent 0695156 commit f6a0ca0
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
branches: [master]
pull_request:

permissions:
pull-requests: write

jobs:
build:
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -41,8 +44,10 @@ jobs:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1
- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --merge "$PR_URL"
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Approve a PR
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: "${{ secrets.DEPENDABOT_GITHUB_TOKEN }}"
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 comments on commit f6a0ca0

Please sign in to comment.