Skip to content

Commit aaff3f1

Browse files
authored
Merge branch 'main' into 16-placeholder-directory-structure
2 parents 064dc96 + 1721113 commit aaff3f1

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.github/workflows/automerge.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Dependabot and Pre-commit auto-merge
2+
3+
on:
4+
pull_request:
5+
6+
permissions:
7+
contents: write
8+
pull-requests: write # Needed if in a private repository
9+
10+
jobs:
11+
auto-merge:
12+
runs-on: ubuntu-latest
13+
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.user.login == 'pre-commit-ci[bot]' }}
14+
steps:
15+
- name: Enable auto-merge for Dependabot and pre-commit-ci PRs
16+
run: |
17+
gh pr review --approve "$PR_URL"
18+
gh pr merge --auto --merge "$PR_URL"
19+
env:
20+
PR_URL: ${{ github.event.pull_request.html_url }}
21+
# GitHub provides this variable in the CI env. You don't
22+
# need to add anything to the secrets vault.
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)