Skip to content

Commit 57a7780

Browse files
committed
MAINT: Automerge for bot PRs
1 parent b19ac58 commit 57a7780

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Diff for: .github/workflows/automerge.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Bot auto-merge
2+
on: pull_request # yamllint disable-line rule:truthy
3+
4+
jobs:
5+
autobot:
6+
permissions:
7+
contents: write
8+
pull-requests: write
9+
runs-on: ubuntu-latest
10+
# Names can be found with gh api /repos/mne-tools/mne-python/pulls/12998 -q .user.login for example
11+
if: (github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.user.login == 'pre-commit-ci[bot]' || github.event.pull_request.user.login == 'github-actions[bot]') && github.repository == 'mne-tools/mne-python'
12+
steps:
13+
- name: Enable auto-merge for bot PRs
14+
run: gh pr merge --auto --squash "$PR_URL"
15+
env:
16+
PR_URL: ${{github.event.pull_request.html_url}}
17+
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 commit comments

Comments
 (0)