auto-merge #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# @todo: sync with other repositories | |
--- | |
name: auto-merge | |
on: | |
# Try merging a pull request when it is approved. | |
pull_request_review: { types: submitted } | |
# Try merging a pull request when a draft is marked as “ready for review” | |
pull_request_target: | |
branches: [$default-branch] | |
types: [ready_for_review, labeled, unlabeled] | |
# Try merging pull requests belonging to a check suite. | |
check_suite: | |
types: | |
- completed | |
status: {} | |
# Try merging the specified pull request or all open pull requests if none is specified. | |
workflow_dispatch: | |
inputs: | |
pull-request: | |
description: pull request number | |
required: false | |
# Try merging all open pull requests. | |
schedule: | |
- cron: 0 4 * * 1 | |
jobs: | |
automerge: | |
runs-on: ubuntu-latest | |
if: github.event.review.state == 'approved' || !github.event.review | |
steps: | |
- name: automerge | |
uses: pascalgn/[email protected] | |
env: | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
MERGE_LABELS: 'automerge,✅ Approved' | |
MERGE_RETRY_SLEEP: "60000" | |
MERGE_DELETE_BRANCH: "true" | |
MERGE_METHOD: squash | |
- name: automerge2 | |
uses: reitermarkus/[email protected] | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
merge-method: merge | |
required-labels: 'automerge,✅ Approved' | |
do-not-merge-labels: ':warning: do-not-merge,:warning: wip' | |
pull-request: ${{ github.event.inputs.pull-request }} | |
dry-run: false |