Skip to content

Where people and agents ship software together. The open-source git platform for the whole job: issues, agents, checks and deploys to the edge.

g1t.sh
21 linesCodeBlameRaw
1name: Dependabot auto-merge
2on: pull_request
3permissions:
4 contents: write
5 pull-requests: write
6jobs:
7 dependabot:
8 runs-on: ubuntu-latest
9 if: github.event.pull_request.user.login == 'dependabot[bot]'
10 steps:
11 - name: Dependabot metadata
12 id: metadata
13 uses: dependabot/fetch-metadata@v2
14 with:
15 github-token: "${{ secrets.GITHUB_TOKEN }}"
16 - name: Enable auto-merge for Dependabot PRs
17 if: steps.metadata.outputs.update-type == 'semver-patch'
18 run: gh pr merge --auto --merge "$PR_URL"
19 env:
20 PR_URL: ${{github.event.pull_request.html_url}}
21 GH_TOKEN: ${{secrets.GITHUB_TOKEN}}