From e34c4d6d096739fa0b787d44dbc4e5f3a46181ac Mon Sep 17 00:00:00 2001 From: Raghav Kansal Date: Fri, 15 Sep 2023 09:29:55 -0500 Subject: [PATCH] Update and rename auto-approve.yml to auto-merge.yml --- .github/workflows/auto-approve.yml | 14 -------------- .github/workflows/auto-merge.yml | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 14 deletions(-) delete mode 100644 .github/workflows/auto-approve.yml create mode 100644 .github/workflows/auto-merge.yml diff --git a/.github/workflows/auto-approve.yml b/.github/workflows/auto-approve.yml deleted file mode 100644 index 3397abaa..00000000 --- a/.github/workflows/auto-approve.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Auto approve - -on: pull_request_target - -jobs: - auto-approve: - runs-on: ubuntu-latest - permissions: - pull-requests: write - if: github.actor == 'pre-commit-ci[bot]' - steps: - - uses: hmarr/auto-approve-action@v3 - with: - review-message: "Auto approved automated PR" diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml new file mode 100644 index 00000000..80f0134a --- /dev/null +++ b/.github/workflows/auto-merge.yml @@ -0,0 +1,17 @@ +name: Pre-commit updates auto-merge +on: pull_request + +permissions: + contents: write + pull-requests: write + +jobs: + dependabot: + runs-on: ubuntu-latest + if: ${{ github.actor == 'pre-commit-ci[bot]' && github.event_name == 'pull_request'}} + steps: + - name: Auto-merge PR + run: gh pr merge --auto --merge "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}