-
Notifications
You must be signed in to change notification settings - Fork 59
31 lines (25 loc) · 888 Bytes
/
automerge.yml
File metadata and controls
31 lines (25 loc) · 888 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: Auto-merge Bot PRs
on: # yamllint disable-line rule:truthy
pull_request_target:
types: [opened, reopened]
permissions:
contents: write
pull-requests: write
jobs:
auto-merge:
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.user.login == 'pre-commit-ci[bot]' }}
steps:
- uses: actions/checkout@v6
- name: Label bot PRs
run: gh pr edit --add-label "ci,skip-changelog" ${{ github.event.pull_request.html_url }}
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
- name: Auto-approve
uses: hmarr/auto-approve-action@v4
with:
github-token: ${{ secrets.PAT }}
- name: Enable auto-merge
run: gh pr merge --auto --squash ${{ github.event.pull_request.html_url }}
env:
GITHUB_TOKEN: ${{ secrets.PAT }}