Repository navigation
Harden the weekly release: wait for CI, check the approver token, skip unadopted branches - #38
Merged
Merged
Conversation
…se back, check the approver token, skip unadopted branches Also warns when a hand-set changelog date is replaced, and counts polls for held runs so the late-run test cannot race the clock.
lachiebol
reviewed
Oct 21, 2026
lachiebol
left a comment
There was a problem hiding this comment.
In general looks good, just curious.
Should we check the head is the same after 120 seconds as well?
I see we have this, but afterwards, we wait 120 seconds and then approve, so there's a gap where changes could be added and subsequently approved
merge_plugin_release_date_pr.sh
head_sha=$(gh pr view "$pr" --json headRefOid --jq .headRefOid)
if [[ "$head_sha" != "$tagged_sha" ]]; then
leave_open "its head is not the commit tagged $VERSION."
fi
I see we have --match-head-commit "$head_sha" so the script won't automatically merge, but someone could merge themself if it's been approved
A push during the wait for held runs was approved along with the tagged commit, leaving it for a person to merge. Re-check the head after the wait and approve with commit_id.
Collaborator
Author
|
Thanks @lachiebol, good catch. The head is now re-checked after the wait, and the approval is pinned to the tagged commit with |
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.
Description
Makes the weekly release safer to leave running.
CI gate. A new version isn't released while a push CI run on the branch's head has failed, or is still running after
ci-wait-minutes(default and maximum 45). The version is skipped, any earlier version being resumed is still finished, and then the run fails so the hold is seen. Runs that can't be read are held the same way. The newest run of each workflow decides, so rerunning a failed one clears it. A head with no push runs, such as a merge made withGITHUB_TOKEN, is released. A newskip-ci-checkinput releases anyway, for a run by hand when the failure is a false positive. The README's caller example passes it through from a dispatch input, and the job timeout goes from 20 to 90 minutes to cover the wait.require-approver-token. When set, the run fails before releasing ifapprover-tokenis empty, so a secret that was renamed, removed or not passed doesn't go unnoticed. The step only sees whether the token is set, not the token.Branch sweep. A maintained branch without the dispatched workflow file is skipped with a notice instead of failing the sweep. A
workflow-filemissing from the default branch still fails, since that means the input is wrong.Smaller fixes. A warning when the release replaces a date set by hand on the changelog entry. Waiting for held runs on the release date PR now counts polls instead of timing against
SECONDS, which fixes an intermittent failure in the late-runs test.Issue No
Related to #36
Steps to Replicate the Issue
Checklist