diff --git a/.github/workflows/auto-approve.yml b/.github/workflows/auto-approve.yml deleted file mode 100644 index 3397aba..0000000 --- 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 0000000..80f0134 --- /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}}