diff --git a/.github/workflows/auto-approve.yml b/.github/workflows/auto-approve.yml new file mode 100644 index 0000000..049ca43 --- /dev/null +++ b/.github/workflows/auto-approve.yml @@ -0,0 +1,23 @@ +name: Auto Approve PRs + +on: + pull_request: + types: [opened, synchronize] + +permissions: + pull-requests: write + +jobs: + auto-approve: + runs-on: ubuntu-latest + if: | + startsWith(github.head_ref, 'feature/') || + startsWith(github.head_ref, 'bugfix/') || + startsWith(github.head_ref, 'claude/') + steps: + - name: Approve PR + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR_URL: ${{ github.event.pull_request.html_url }} + run: | + gh pr review $PR_URL --approve