From bea6f0bb9f68b92de835c72752d5290b219f2e09 Mon Sep 17 00:00:00 2001 From: Jacob Cook Date: Wed, 26 Feb 2025 15:01:40 +0000 Subject: [PATCH 1/2] Added automerge options for dependabot and pre-commit PRs --- .github/workflows/automerge.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 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..3b61607 --- /dev/null +++ b/.github/workflows/automerge.yml @@ -0,0 +1,23 @@ +name: Dependabot and Pre-commit auto-merge + +on: + pull_request: + +permissions: + contents: write + pull-requests: write # Needed if in a private repository + +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: + - name: Enable auto-merge for Dependabot and pre-commit-ci PRs + run: | + gh pr review --approve "$PR_URL" + gh pr merge --auto --merge "$PR_URL" + env: + PR_URL: ${{ github.event.pull_request.html_url }} + # GitHub provides this variable in the CI env. You don't + # need to add anything to the secrets vault. + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From 6bdc4dc13d0fa252c87edf3abd1801fa61861972 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 26 Feb 2025 15:04:39 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .github/workflows/automerge.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml index 3b61607..66c4bdd 100644 --- a/.github/workflows/automerge.yml +++ b/.github/workflows/automerge.yml @@ -20,4 +20,4 @@ jobs: PR_URL: ${{ github.event.pull_request.html_url }} # GitHub provides this variable in the CI env. You don't # need to add anything to the secrets vault. - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}