ci: post Release PR Gate after tests via a shared action - #509
Merged
Conversation
Replace the racing merge gate with a composite action that posts a "Release PR Gate" commit status. It runs after each test suite concludes (release-gate jobs in lint, phpunit and playwright, for release/v*/* PRs) and defers while any required suite is still running, so only the last suite posts the verdict and the status never flaps red mid-run. A release PR without the run-tests label is flagged. merge-gate.yml is slimmed to re-evaluate the gate on checkbox and label edits.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reworks the Release PR Gate so it runs after the test suites instead of racing them, which is why the gate could show red before the tests had a chance to finish.
How it works
.github/actions/release-gateposts aRelease PR Gatecommit status, and applies only torelease/v*/*pull requests.release-gatejob in each test workflow (lint,phpunit,playwright), each gated on its own suite concluding. The action reads the three summary results:failure("CI checks not all passing");success, orfailurewith the reason.run-testslabel is flagged (failure, "add the run-tests label"), since the suites do not run without it.merge-gate.ymlis slimmed to a thin re-evaluator onedited/labeled/unlabeledevents, so ticking a checkbox or changing a label re-posts the status without a re-push. It also defers while tests run, so it no longer races them.Non-release pull requests are unaffected: the gate posts nothing for them.
Note:
merge-gate.ymlis kept (slimmed) rather than deleted, because the checkbox approval is apull_request: editedevent that the test workflows do not run on; a trigger is still needed to re-evaluate the gate when a box is ticked.