add auto-merge workflow for all PRs

This commit is contained in:
Harivansh Rathi 2026-04-01 18:31:07 +00:00
parent 5c8b59529c
commit 1217c22652

21
.github/workflows/auto-merge.yml vendored Normal file
View file

@ -0,0 +1,21 @@
name: auto-merge
on:
pull_request:
types: [opened, synchronize, reopened]
branches: [main]
permissions:
contents: write
pull-requests: write
jobs:
enable-auto-merge:
runs-on: ubuntu-latest
steps:
- name: Enable auto-merge
run: gh pr merge --auto --squash "$PR_NUMBER"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
PR_NUMBER: ${{ github.event.pull_request.number }}