Skip to content

Commit 74032c1

Browse files
authored
Merge pull request #71 from VCTLabs/autobotmerge
autoapprove action
2 parents a1aebc0 + 210303f commit 74032c1

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

.github/workflows/autobot.yml

+16-10
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,28 @@
1-
name: Dependabot auto-merge
2-
on: pull_request
1+
name: Dependabot automation
2+
3+
on: # yamllint disable-line rule:truthy
4+
pull_request:
5+
types:
6+
- opened
7+
- synchronize
38

49
permissions:
5-
pull-requests: write
610
contents: write
11+
pull-requests: write
712

813
jobs:
914
dependabot:
15+
env:
16+
PR_URL: ${{ github.event.pull_request.html_url }}
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1018
runs-on: ubuntu-latest
11-
if: ${{ github.actor == 'dependabot[bot]' }}
19+
if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]'
1220
steps:
13-
- name: Dependabot metadata
21+
- name: Fetch Dependabot metadata
1422
id: metadata
1523
uses: dependabot/fetch-metadata@d7267f607e9d3fb96fc2fbe83e0af444713e90b7 # v2.3.0
1624
with:
1725
github-token: "${{ secrets.GITHUB_TOKEN }}"
18-
- name: Enable auto-merge for Dependabot PRs
19-
run: gh pr merge --auto --merge "$PR_URL"
20-
env:
21-
PR_URL: ${{github.event.pull_request.html_url}}
22-
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
26+
27+
- name: Enable auto-approve for Dependabot PRs
28+
run: gh pr review --approve "${PR_URL}"

0 commit comments

Comments
 (0)