Repository navigation
feat(release)!: settle releases from branch state, not from a settle-PR merge - #56
Merged
Merged
Conversation
Adds settle_state(), the settle-state subcommand and the route dispatch mapping plus the sweep filter that keeps a tag-without-Release branch eligible. Unit tests run under unittest discovery.
Generates an undated note section, computes the settlement state before touching anything, and skips the ensure-PR step entirely when the branch is unchanged. Empty changelog_file is now legal.
Adds settle_source=dispatch, which verifies the merged candidate PR's merge SHA, head, dual base, author and live release-branch tip, re-running that whole check inside the tagging step. Resumes a tag whose branch has moved on. Publishes the changelog section verbatim.
A versioned dispatch now gathers the merged candidate PR (normalising an app login from app/<name> to <name>[bot]), the ancestry of its merge commit, whether a settle PR is open, the published tag SHA and whether a Release exists, and emits pr_number.
Adds stage: refresh, which merges the PR's own base and re-drafts the entry as a fast-forward push, plus the workflow job that refreshes trunk candidates only. Documents that a refresh clears approvals.
The settle publish job and on-release's binary job are the only jobs behind the review-gated publish environment; every PR-creating job reads the app credentials from repository scope and declares no environment.
Replaces L2's environment requirement with a file allowlist for the release workflow files and aligns L5, keeping L1, L3, L4 and L6 unchanged.
Rewrites the releasing guide and the shared action guide for the undated entry, the dispatch settlement, the publish environment and the candidate refresh.
Updates the shell fixtures and the template-copy tests for the new layout, and regenerates the action documentation catalogue.
… shell steps A consumer that omits the newer inputs, or a harness that extracts these steps without the action input defaults, hit "SETTLE_SOURCE: unbound variable" under set -u. Default them at the top of both steps so an omitted input means the old pr behaviour.
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.
What this does
Settlement stops being "merge a settle PR" and becomes a decision read from repository state. A release branch nobody touched produces no settle PR at all, and an explicit versioned
workflow_dispatchtags the candidate PR's merge commit - the commit that already sits on the default branch - behind the review-gatedpublishenvironment. When the branch does carry fixes, today's settle PR remains and merging it is still the approval.Shape
--allow-emptysettlement commit and a PRsettled=false; identity, notes and PR steps all skippedclean/resume, refreshes otherwise, skips when already published--section-matchesmakes a stale sectionneeds-settle-pr; publish refuses to tag onestage: refreshmerges the PR's own base (never rebases) and re-draftsreleasepublishenvironment: releaseVerification
Local only - no workflow has executed this code:
python3 -m unittest discover -s .github/actions/release-tools- 84 tests OKpython3 -m unittest discover -s .github/scripts- 85 tests OKaction_docs.py --check- documentation up to dateapp_token_lint.py --repo my-repo workflow-templates/- 5 files cleanroute()driven end to end with the payload the route action emits: clean ->publishwithpr_number, resume ->publishat the tagged SHA, open settle PR ->refresh, published ->skip, push -> neverpublishKnown gaps, deliberately not hidden
actions-test.ymlhas never run - noacton the authoring host.megaeth-labs/test-release-pipelineis unreachable (404), so cases A-D and the adversarial probes are unproven.section_matches; a stale section there is refused loudly at publish, not routed to refresh.publishenvironment still needs its one required reviewer (owner console action).Consumer impact
Nothing changes for a repo until it copies these templates.
release-v2.3.0and PR #2551 in mega-reth are untouched by this branch and publish through the existing marker path.