Skip to content

Commit 1a6ee1b

Browse files
build: add auto-merge workflow for Dependabot
1 parent 9701285 commit 1a6ee1b

File tree

2 files changed

+23
-11
lines changed

2 files changed

+23
-11
lines changed

.github/workflows/auto-approve-dependabot-workflow.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Dependabot auto-merge
2+
on:
3+
pull_request
4+
jobs:
5+
dependabot:
6+
runs-on: ubuntu-latest
7+
if: github.actor == 'dependabot[bot]'
8+
steps:
9+
- name: 'Auto approve PR by Dependabot'
10+
uses: hmarr/[email protected]
11+
with:
12+
github-token: "${{ secrets.GITHUB_TOKEN }}"
13+
- name: 'Comment merge command'
14+
uses: actions/github-script@v3
15+
with:
16+
github-token: ${{secrets.GITHUB_TOKEN }}
17+
script: |
18+
await github.issues.createComment({
19+
owner: context.repo.owner,
20+
repo: context.repo.repo,
21+
issue_number: context.issue.number,
22+
body: '@dependabot squash and merge'
23+
})

0 commit comments

Comments
 (0)