Skip to content

Commit

Permalink
Auto-approve fix for BOT_PAT (#176)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea authored Mar 11, 2024
1 parent a780188 commit 7b3aa5b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,15 @@ jobs:

# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions#approve-a-pull-request
- name: Enable auto-merge for safe bots PRs
if: contains(fromJson('["dependabot[bot]", "pre-commit-ci[bot]"]'), github.actor)
if: env.BOT_PAT != null && contains(fromJson('["dependabot[bot]", "pre-commit-ci[bot]"]'), github.actor)
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
PR_URL: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ secrets.BOT_PAT || secrets.GITHUB_TOKEN }}

- name: Approve a PR
if: contains(fromJson('["dependabot[bot]", "pre-commit-ci[bot]"]'), github.actor)
if: env.BOT_PAT != null && contains(fromJson('["dependabot[bot]", "pre-commit-ci[bot]"]'), github.actor)
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
GH_TOKEN: ${{ secrets.BOT_PAT || secrets.GITHUB_TOKEN }}

0 comments on commit 7b3aa5b

Please sign in to comment.