name: Pre-commit Auto Approve & Merge on: pull_request permissions: pull-requests: write contents: write jobs: pre-commit: runs-on: ubuntu-latest if: github.event.pull_request.user.login == 'pre-commit-ci[bot]' && github.event.pull_request.user.type == 'Bot' steps: - name: Approve & Auto-Merge PR run: | gh pr review --approve "${PR_URL}" gh pr merge --auto --squash "${PR_URL}" env: PR_URL: ${{github.event.pull_request.html_url}} GH_TOKEN: ${{secrets.GITHUB_TOKEN}}