From 59eac66bd5e5473d0fb31082374ff0fcbab18a8d Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Mon, 9 Dec 2024 14:18:55 -0800 Subject: [PATCH] Add auto merge --- .github/workflows/automerge.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/automerge.yml diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml new file mode 100644 index 0000000..4398189 --- /dev/null +++ b/.github/workflows/automerge.yml @@ -0,0 +1,17 @@ +name: Bot auto-merge +on: pull_request # yamllint disable-line rule:truthy + +permissions: + contents: write + pull-requests: write + +jobs: + autobot: + runs-on: ubuntu-latest + if: (github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.user.login == 'pre-commit-ci[bot]') && github.repository == 'pyiron/pysqa' + steps: + - name: Enable auto-merge for bot PRs + run: gh pr merge --auto --squash "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GH_TOKEN: ${{secrets.GITHUB_TOKEN}}