Skip to content

Commit 5f4fe96

Browse files
committed
Change it to merge pull requests automatically
1 parent f6b8f45 commit 5f4fe96

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/dependabot-merge.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
name: Dependabot auto-approve
1+
name: Dependabot auto-merge
22
on: pull_request
33

44
permissions:
5+
contents: write
56
pull-requests: write
67

78
jobs:
@@ -14,8 +15,9 @@ jobs:
1415
uses: dependabot/fetch-metadata@v2
1516
with:
1617
github-token: "${{ secrets.GITHUB_TOKEN }}"
17-
- name: Approve a PR
18-
run: gh pr review --approve "$PR_URL"
18+
- name: Enable auto-merge for Dependabot PRs
19+
if: contains(steps.metadata.outputs.dependency-names, 'my-dependency') && steps.metadata.outputs.update-type == 'version-update:semver-patch'
20+
run: gh pr merge --auto --merge "$PR_URL"
1921
env:
2022
PR_URL: ${{github.event.pull_request.html_url}}
2123
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 commit comments

Comments
 (0)