Enable auto merge for allowed bots

This commit is contained in:
Gabriel Augendre 2023-03-14 10:13:46 +01:00
parent b8f4ffe6e6
commit 78efe472a3

View file

@ -40,3 +40,17 @@ jobs:
working-directory: ./src/
- name: Check pre-commit
run: pre-commit run --all-files
auto_merge:
name: Auto merge
runs-on: ubuntu-latest
needs: tests
if: >-
github.event.pull_request
&& github.event.pull_request.merged == false
&& (
github.event.pull_request.user.login == "crocmagnon-pr[bot]"
|| github.event.pull_request.user.login == "pre-commit-ci[bot]"
)
steps:
- name: Auto merge
run: gh pr merge ${{github.event.pull_request.number}} --delete-branch --rebase