Skip to content

Commit 2f5c68b

Browse files
committed
Automatically merge dependabot PRs
1 parent d771a0f commit 2f5c68b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.github/workflows/code_health_fork.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,19 @@ jobs:
8888
file: coverage/lcov.info
8989
git-branch: ${{ github.head_ref || github.ref_name }}
9090
git-commit: ${{ github.event.pull_request.head.sha || github.sha }}
91+
92+
merge-dependabot-pr:
93+
name: Merge Dependabot PR
94+
if: github.event.pull_request.user.login == 'dependabot[bot]'
95+
runs-on: ubuntu-latest
96+
permissions:
97+
pull-requests: write
98+
contents: write
99+
needs:
100+
- coverage
101+
steps:
102+
- name: Enable auto-merge for Dependabot PRs
103+
run: gh pr merge --auto --squash "$PR_URL"
104+
env:
105+
PR_URL: ${{github.event.pull_request.html_url}}
106+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 commit comments

Comments
 (0)