File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ # Pull request auto-merge
2+ #
3+ # Automatically merge pull requests after requirements are met.
4+ #
5+ # References:
6+ #
7+ # - https://cli.github.com/manual/gh_pr_merge
8+ # - https://docs.github.com/actions/learn-github-actions/contexts
9+ # - https://docs.github.com/actions/using-workflows/events-that-trigger-workflows#pull_request
10+ # - https://docs.github.com/actions/using-workflows/using-github-cli-in-workflows
11+ # - https://docs.github.com/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-auto-merge-for-pull-requests-in-your-repository
12+ # - https://docs.github.com/webhooks-and-events/webhooks/webhook-events-and-payloads#pull_request
13+ # - https://github.com/actions/checkout
14+ # - https://github.com/hmarr/debug-action
15+
16+ ---
17+ name : auto-merge
18+ on :
19+ pull_request :
20+ types :
21+ - opened
22+ - synchronize
23+ env :
24+ GITHUB_TOKEN : ${{ secrets.PAT_REPO }}
25+ jobs :
26+ auto-merge :
27+ if : github.event.pull_request.auto_merge == null && github.event.pull_request.draft == false
28+ runs-on : ubuntu-latest
29+ steps :
30+ - id : debug
31+ name : Print environment variables and event payload
32+ 33+ - id : checkout
34+ name : Checkout ${{ github.head_ref }}
35+ 36+ with :
37+ persist-credentials : false
38+ ref : ${{ github.head_ref }}
39+ - id : enable
40+ name : Enable auto-merge
41+ run : gh pr merge ${{ github.event.number }} --auto --squash
You can’t perform that action at this time.
0 commit comments