automerge #385
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
name: automerge | |
# **What it does**: Pull requests with label "automerge" or "autosquash" will automatically merge. | |
# **Why we have it**: While now this is a feature built into GitHub, we still use it as part of other automation. | |
# **Who does it impact**: Any workflows that depend on automerge or autosquash labels. | |
on: | |
pull_request: | |
types: | |
- labeled | |
- unlabeled | |
- synchronize | |
- opened | |
- edited | |
- ready_for_review | |
- reopened | |
- unlocked | |
pull_request_review: | |
types: | |
- submitted | |
check_suite: | |
types: | |
- completed | |
status: {} | |
jobs: | |
automerge: | |
runs-on: ubuntu-latest | |
if: (contains(github.event.pull_request.labels.*.name, 'automerge') || contains(github.event.pull_request.labels.*.name, 'autosquash')) && (github.repository == 'github/docs-internal' || github.repository == 'github/docs') | |
steps: | |
- name: automerge | |
uses: 'pascalgn/automerge-action@c9bd1823770819dc8fb8a5db2d11a3a95fbe9b07' | |
env: | |
GITHUB_TOKEN: '${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}' | |
MERGE_METHOD_LABELS: 'automerge=merge,autosquash=squash' | |
MERGE_COMMIT_MESSAGE: 'pull-request-title' | |
MERGE_METHOD: 'merge' | |
MERGE_FORKS: 'true' | |
MERGE_RETRIES: '50' | |
MERGE_RETRY_SLEEP: '10000' # ten seconds | |
UPDATE_LABELS: 'automerge,autosquash' | |
UPDATE_METHOD: 'merge' | |
HUSKY: '0' # Disable pre-commit hooks |