docs(integration): the default-branch guide says the toolkit assumes main, offers two override routes that cannot reach it, and omits the wrapper triggers #1565
Labels
No labels
bump
major
bump
minor
bump
patch
kind
bug
kind
chore
kind
docs
kind
epic
kind
feature
loop/paused
mirror-drift
priority
critical
priority
high
priority
low
priority
medium
size
L
size
M
size
S
size
XL
status
blocked
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
frankenbit/release-toolkit#1565
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
docs/integration.md's "Default branch (#370)" section is the adopter's guide for a repository whose branch is notmain. It opens by saying the toolkit assumesmain"in most places", which is no longer true. It also offers two override routes that cannot reach the toolkit. And it never tells the adopter to change thebranches: [main]triggers in the wrappers they copy.Measured
All reads are on live
origin/main6a36090, 2026-10-06.1. "Assumes
mainin most places" (docs/integration.md:633) is out of date. Every path that targets the default branch now resolves it through the layered resolver,prep.DefaultBranchResolver(internal/prep/git.go:299-320):rt prep: the rolling PR's base (cmd/rt/prep.go:718-732).rt post-cut: the manifest push (cmd/rt/post_cut.go:272-275).rt manifest-pr: the manifest PR's base (cmd/rt/manifest_pr.go:149).rt default-branch: used by recover-pending-cut (reusable-recover-pending-cut.yml:414) and by the cut's post-condition step (reusable-release.yml:983).The
"main"literals left incmd/rt:rt prep's last-resort backstop, reached only when every layer fails (prep.go:731).manifest-precheck(:111), which no workflow calls, and inmanifest-postcondition(:282), whose result CI overrides.--branch/--baseflag defaults onstatus-context-check,pre-pushandrepin, which are toolkit-side tools.2. The "dispatch input" route does not exist.
:580("default_branchranks an explicit dispatch input at the top"),:590("which a dispatch input can set") and the layer-1 row at:639.workflow_callinputs were listed at6a36090, and no name contains "branch".with:, and there is nowith:slot for this.3. The "Environment override example" (
:666-675) cannot reachrt.env: RT_DEFAULT_BRANCH: trunkon a job that calls the reusable throughuses:.RT_DEFAULT_BRANCH: ${{ vars.RT_DEFAULT_BRANCH }}in its ownenv:(reusable-release.yml:615,reusable-recover-pending-cut.yml:256). Under Actions env precedence a step-level key replaces any inherited value, with an empty string when the variable is unset. So even if Forgejo passed the caller'senv:into the called workflow,trunkwould not reachrt.env:on auses:job, as GitHub's workflow syntax does, or ignores it.4. The wrapper triggers are left at
main, and the section does not say to change them. The wrappers the docs ask adopters to copy trigger onbranches: [main]:docs/integration.md:866(release.yml),:1197(pr.yml) and:1370(prepared-uncut-check.yml);README.md:249;examples/{go,node}-project/.forgejo/workflows/{release,pr}.yml.An adopter on
masterwho copies them as they are gets no automatic cut:release.ymlruns only through itsworkflow_dispatchtrigger. The PR gates never run at all. Nothing in the "Default branch" section mentions this.5. "Picked up automatically" holds at two of three callsites.
:677says the reusable picks upvars.RT_DEFAULT_BRANCHautomatically. That is true at the act-on-decision step and at recover-pending-cut. It is not true at the cut's post-condition step: #1564 covers that in code.Why it matters
This section is what an adopter on
master,trunkordevelopreads first. Today it tells them the toolkit mostly assumesmain, which would put them off for no reason, and it offers two override routes that do nothing. It also misses the one edit they really need, the wrapper triggers. Without that edit, a push never starts a release, and the PR gates never run.Acceptance criteria
:633describes the current behaviour. The toolkit resolves the default branch wherever it targets it, and refuses rather than guessing. Name the one remaining guess,rt prep's backstop, if it still exists when this lands.:580,:590and the layer-1 row at:639. The section names the two routes that do reach the toolkit: thevars.RT_DEFAULT_BRANCHrepo variable anddefault_branch:inrelease-toolkit.yml.:666-675) is removed, or replaced with the repo-variable route.mainto changebranches: [main]in each wrapper they copy, and names the wrappers.:677stays accurate after #1564 lands, or names the step it does not yet cover.rt register-checkandscripts/anchor-check.pypass on every changed doc.