Skip to content

dependabot-automerge: only attempt approval of unapproved PRs. #45

dependabot-automerge: only attempt approval of unapproved PRs.

dependabot-automerge: only attempt approval of unapproved PRs. #45

name: Dependabot auto-merge
on: pull_request
jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' && github.event.review.state != 'APPROVED' }}
steps:
- name: Approve & enable auto-merge for Dependabot PRs
run: gh pr review --approve -b "Auto-approving dependabot PR." "$PR_URL" && gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.DIVVIUP_GITHUB_AUTOMATION_DEPENDABOT_APPROVER_PAT}}