Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .github/workflows/cascade-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
--title "Cascade merge: 4.x into master" \
--body "Automated cascade merge that keeps \`master\` in sync with the \`4.x\` maintenance branch.

This PR tracks \`4.x\` and merges automatically once required checks pass. A new one is opened after each merge, so every future push to \`4.x\` keeps flowing forward into \`master\`.
This PR tracks \`4.x\` and merges automatically once required checks pass, when auto-merge is allowed for the repository; otherwise merge it manually. A new one is opened after each merge, so every future push to \`4.x\` keeps flowing forward into \`master\`.

If this PR shows a conflict, resolve it manually on \`4.x\` (or directly on this PR's branch) — auto-merge will pick it up once it's clean again." \
> /tmp/pr-create.log 2>&1; then
Expand All @@ -58,4 +58,12 @@ jobs:
fi

echo "Enabling auto-merge on PR #$PR_NUMBER"
gh pr merge "$PR_NUMBER" --merge --auto
if ! gh pr merge "$PR_NUMBER" --merge --auto > /tmp/pr-merge.log 2>&1; then
cat /tmp/pr-merge.log
# "Allow auto-merge" is off in the repository settings: the PR stays open for a manual merge
if grep -qi "Auto merge is not allowed" /tmp/pr-merge.log; then
echo "::notice title=Cascade PR #$PR_NUMBER::Auto-merge is not allowed for this repository, merge the cascade PR manually."
exit 0
fi
exit 1
fi
2 changes: 2 additions & 0 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
push:
branches:
- master
# Manual runs, e.g. on master after a cascade merge, whose push does not trigger workflows
workflow_dispatch:

jobs:
build:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
push:
branches:
- master
# Manual runs, e.g. on master after a cascade merge, whose push does not trigger workflows
workflow_dispatch:

permissions:
contents: read
Expand Down
Loading