File tree Expand file tree Collapse file tree 2 files changed +38
-3
lines changed
Expand file tree Collapse file tree 2 files changed +38
-3
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/using-workflows/events-that-trigger-workflows#pull_request
9+ # - 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
10+ # - https://docs.github.com/webhooks-and-events/webhooks/webhook-events-and-payloads#pull_request
11+ # - https://github.com/actions/checkout
12+ # - https://github.com/hmarr/debug-action
13+
14+ ---
15+ name : auto-merge
16+ on :
17+ pull_request :
18+ types :
19+ - opened
20+ - synchronize
21+ jobs :
22+ auto-merge :
23+ if : github.event.pull_request.auto_merge == null && github.event.pull_request.draft == false
24+ runs-on : ubuntu-latest
25+ steps :
26+ - id : debug
27+ name : Print environment variables and event payload
28+ uses : hmarr/debug-action@v2.1.0
29+ - id : checkout
30+ name : Checkout ${{ github.head_ref }}
31+ uses : actions/checkout@v3.3.0
32+ with :
33+ ref : ${{ github.head_ref }}
34+ - id : auto-merge
35+ name : Enable auto-merge
36+ run : gh pr merge ${{ github.event.pull_request.number }} --auto --squash
37+ env :
38+ GITHUB_TOKEN : ${{ secrets.PAT_REPO }}
Original file line number Diff line number Diff line change 4444 persist-credentials : ${{ steps.metadata.outputs.package-ecosystem == 'npm_and_yarn' }}
4545 ref : ${{ github.head_ref }}
4646 token : ${{ env.GITHUB_TOKEN }}
47- - id : enable-auto-merge
48- name : Enable auto-merge
49- run : gh pr merge ${{ github.event.number }} --auto --squash
5047 - id : gpg-import
5148 name : Import GPG key
5249 if : steps.metadata.outputs.package-ecosystem == 'npm_and_yarn'
You can’t perform that action at this time.
0 commit comments