Skip to content

automerge PRs

automerge PRs #25

Workflow file for this run

# This workflow automatically merges pull requests when they are ready.
name: automerge PRs
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:
# Temporarily disable auto-merge to development until I have a solution for forks.
#
# # Auto-approve anything to development as long as it meets the merge requirements
# automerge-to-development:
# if: github.base_ref == 'development'
# runs-on: ubuntu-latest
# steps:
# - name: automerge
# uses: pascalgn/[email protected]
# env:
# GITHUB_TOKEN: ${{ secrets.WRITE_TOKEN }}
# # Do not merge if the "block-merge" label is applied.
# MERGE_LABELS: "!block-merge"
# # Always do a squash commit.
# MERGE_METHOD: squash
# # Use GitHub's default merge commit message.
# MERGE_COMMIT_MESSAGE: automatic
# Only auto-approve PRs to release if they came from development in this fork
automerge-to-release:
if: github.head_ref == 'dev' && github.base_ref == 'release'
runs-on: ubuntu-latest
steps:
- name: automerge
uses: pascalgn/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.WRITE_BOT_TOKEN }}
# Do not merge if the "block-merge" label is applied.
MERGE_LABELS: "!block-merge"
# Always do a merge commit.
# This is critical to keep release and dev
# histories in sync.
MERGE_METHOD: merge
# Use GitHub's default merge commit message.
MERGE_COMMIT_MESSAGE: automatic
# Never auto-merge from forks.
# Forks SHOULD never cut PRs to release,
# but check this just in case.
MERGE_FORKS: false