name: Dependabot Automerge on: pull_request_target: types: # - edited # PR's base branch was changed - opened - reopened - synchronize # PR's branch was edited (i.e. new commits) jobs: dependabot-automerge: if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }} permissions: # actions/checkout@v4, `gh` CLI contents: write # `gh` CLI repository-projects: read pull-requests: write runs-on: ubuntu-latest steps: # Required for `gh` CLI - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5 - run: gh pr merge "${{ github.event.pull_request.number }}" --squash --auto env: GH_TOKEN: ${{ github.token }}