fix(examples): release-branch cuts the version the changelog names, and composes nothing #18
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
actions/changelog!18
Loading…
Reference in a new issue
No description provided.
Delete branch "mikluko/octant/1718-written-version"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What this does
examples/release-branch/composed its pre-release tag fromgithub.run_numberand from the branch name's last hyphenated segment. Both are wrong, and neither
is repaired here: composing at all is what was wrong. The action exists to
make everything downstream follow from the document, and the example went around
it. Writing
1.3.0-rc.2in the heading is now what cutsv1.3.0-rc.2.Supersedes #13, which rebuilt the example faithfully around the derivation.
The two guards
Both workflows cut the version the newest entry names. They differ in one word:
prereleaseandalready-taggedare outputs the action already had. Dropping-rc.2from the heading is how the branch says the release is ready, so theguard is what stops the branch taking the final tag off the trunk.
A push that changes no version cuts nothing. The run-number scheme cut a
candidate on every push, including a typo fix in a README; here the file
advances the sequence and pushing does not.
What that forced
prerelease-entrymoves to the trunk invocation alone. A candidate is a headingunder this strategy now, so raising the check on the branch or on pull requests
would refuse the shape the strategy runs on.
The cost is stated rather than hidden: the check judges the whole document, so
switching it off to permit the newest heading permits a stale candidate below it
too.
CHANGELOG.broken.mdcarries one, and the test holds only the trunkinvocation to reporting it.
The unguarded-suffix defect dies with the derivation rather than by an allowlist
in the trigger, so
branches: ['release/*']needs no stage enumeration and asecond stage costs no workflow change — the property the branch-name derivation
was reached for in the first place, now safe because nothing reads the name.
A scope decision, flagged
main.yamlgains the mirror step. The README already claimed the trunk cutsthe final tag without showing it, and the two guards are only legible as one word
apart when both are on the page. It is additive to a file this defect does not
otherwise touch.
Both steps push the tag rather than composing into an output, which is forced:
with nothing to compute, a step that only composed has no reason to exist.
Size
The example README goes from 295 lines on #13 (182 on
main) to 122. The wholeordinal, suffix, enumeration and stage-derivation argument is gone, because there
is no derivation left to defend.
Checks
go test ./...,go vet ./...,gofmt -lclean,go run ./cmd/gen-readmeidempotent. The examples are executed rather than described, so the per-invocation
finding lists in
examples_test.goare what hold the README's tables honest.No name, host, version or secret from any consuming repository appears; the diff
was audited by hand for it, per the standing rule that a denylist test would be
the disclosure it prevents.