Automate the merge pending release flag on self-healing doc PRs - #3397
Merged
Conversation
Answers one binary question via commit ancestry against the newest published v5 tag: is the PR's merge commit contained in a release users can install? Deliberately avoids milestones and release-note parsing, and distinguishes API errors (exit 2) from a negative answer (exit 1).
Removes 'flag: merge pending release' from open doc PRs when the strapi/strapi PR they document reaches a published release, replacing a manual step. Runs Wednesdays and Thursdays after the release window. PRs held by 'temp - future media lib' or "flag: don't merge" keep the flag regardless.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Collaborator
Author
|
LGTM, let's merge it in prod and test it (dry runs) |
This was referenced Aug 25, 2026
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.
This PR removes a manual step: the
flag: merge pending releaselabel is now dropped automatically once the strapi/strapi PR a doc PR documents reaches a published release. A scheduled job runs Wednesdays and Thursdays at 15:00 UTC, after the usual release window, and aworkflow_dispatchtrigger with adry_runinput allows testing without changing anything.The release test is deterministic rather than date-based:
.github/scripts/is-strapi-pr-released.shasks GitHub whether the source PR's merge commit is an ancestor of the newest published v5 tag, which answers "is this available on npm?" rather than "was the branch locked?". It deliberately avoids milestone due dates (a plan that can slip) and release-note parsing (prose that can change format), picks the newest non-draft non-prerelease v5 tag explicitly because v4 maintenance releases interleave chronologically, and distinguishes API errors (exit 2) from a negative answer (exit 1) so an outage is never read as "not released".PRs carrying
temp - future media liborflag: don't mergekeep the flag regardless of release state, since those are held for reasons unrelated to shipping. Simulated locally against the 11 currently flagged PRs: 4 correctly held, 5 still waiting on a release, 2 skipped for lacking a source PR reference, 0 wrongly unflagged. The script itself passes 10 test cases covering all three exit codes.This is the prerequisite for the auto-merge design: without it, roughly one self-healing PR in three would be auto-merged before the maintainer had a chance to flag it.