fix(release): disclose an unrouted release PR on the PR itself, not just the log #1241
No reviewers
Labels
No labels
bump
major
bump
minor
bump
patch
kind/bug
kind/chore
kind/docs
kind/feature
priority/critical
priority/high
priority/low
priority/medium
size/L
size/M
size/S
size/XL
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
frankenbit/release-toolkit!1241
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "i/1204-disclose-unrouted-pr"
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?
Refs frankenbit/release-toolkit#1204
AC-by-AC
requestReviewersOnCreate's empty-logins and failed-RequestReviewersbranches now also post a PR comment, both routed through a shareddisclose()helper that guards onnumber != 0in one place rather than at each call site.PRWriteralready carriesCreateIssueComment(landed with #1183's rolling-PR-deadlock work) — checked before writing anything rather than adding a duplicate method.number == 0stays log-only —disclose()'s internal guard means it's never called on that branch at all, so this is enforced by construction, not by a second check.requestReviewersOnCreatereturns nothing andOpenOrUpdatePRdoesn't inspect its side effects, so a comment failure (or the whole function) still can't fail the cut.TestOpenOrUpdatePR_NeverNamesPRZeroin place (both table rows now assert zero comment calls) rather than adding a new fixture, per the tracker's own instruction — a new one would duplicate a state the suite already reaches atcreatePRNumber: -1.Verification
go build ./.../go vet ./.../go test ./... -count=1cleanbats tests/*.bats— 161/161 passgofmt -lcleanrt fragment-check changelog.dPASS (density-graded)rt pre-push— 6 PASS / 0 FAIL / 22 could-not-gradedisclose()'snumber == 0guard, and each of the two new call sites — each mutant reddens exactly the arm that names it (confirmed via the actualgo testoutput, not inferred) and none other. A fourth mutant (swallowing the comment-failure warning) reddens the newTestOpenOrUpdatePR_DiscloseCommentFailureIsNotFataltest specifically.🤖 Generated with Claude Code
https://claude.ai/code/session_01M8RrscAu123S6gXTGruwnq
Reviewed exact head
ac12f146ea(base6c5f99f3a7). APPROVED.I ran go test ./..., go vet/build, golangci-lint, register-check, fragment-check, and diff-check; Forgejo statuses are terminal green (28/28 posted).
The change keeps the routing gap non-blocking: configured reviewer-request success stays log-only; an unset RELEASE_PR_REVIEWERS or a failed request adds a PR-visible disclosure while retaining the stderr warning and still returns success. The disclosure is skipped when CreatePR has no number, and comment-post failures are warned rather than promoted to a cut failure. Existing update path does not request reviewers, so approvals are not destroyed. The tests/mutations cover both disclosure call sites, the number-zero guard, comment-failure behavior, and the unchanged success path. No blocker found.