Repository navigation
fix(pr-merge): wrap the refusal comment's reasons to 100 columns - #11103
Conversation
enable-auto-merge's refusal comment put each reason on one fenced line, which GitHub scrolls sideways (up to 347 columns measured). Reasons now go through address-feedback's quote(): wrapped at a space to 100 columns, continuations indented two spaces, more than 20 lines folded into <details>. The marker lines and the head line are unchanged. refusalReasons() joins wrapped lines back and also accepts a comment posted in the old one-line format; personReasons, holdPathOnly and clear-escalations' nativeRefusal read through it, and refusalWrites treats an old-format comment with the same reason as unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… them Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
claude-security-review reviewed No security issues found in #11103 at 430c3a5. critical-findings: 0 I read the whole diff. I read the surrounding code in
|
|
claude-review reviewed No findings. I read the full diff and the surrounding enable-auto-merge code; I did not run any tests. The test counts in the PR description are the author's claims, unverified by me. Checked by reading:
No cost or critical-security hold applies. |
No related issue: enable-auto-merge batch item 4 (refusal comment wrap)
Summary
enable-auto-merge's standing refusal comment (
refusalBody) put each reason on one fenced line.GitHub scrolls a code-block line sideways instead of wrapping it, and open lanes App pull requests
carry reason lines of up to 347 columns. Reasons now go through the
quote()helper from #10968:each line wraps at a space to 100 columns, continuation lines are indented two spaces, and more
than 20 lines fold into a
<details>block.The parts that tools read stay byte-identical: the escalation and
babysit-merge-riskmarkerlines, the line naming the head (prose wraps when GitHub renders it), the whole-review record
lines, and the last-line
unarmed-sinceandpartialmarks.Fix
quote()andwrapLine()move frompr-unblock/verify-notes.mjsintopr-unblock/address-feedback.mjs, which enable-auto-merge already imports.quote()gains a<details>summary parameter whose default keeps verify-notes' text, so its comments do notchange.
fenced()trims each reason line and collapses runs of whitespace to one space. A wrap at aspace then joins back exactly.
New
refusalReasons(body, person, head, label, {since, partial, records})finds the fence byits markers, which also works inside
<details>. It tries two formats:refusalBody;Anything else returns null, so a comment it cannot read keeps its label.
The readers:
personReasonsandholdPathOnly(through it)nativeRefusalinclear-escalations.mjsslice(5, -1)laneCausenativeRefusalreturnsrefusalWritesprMergeEscalationspr-require-checks.yml)Two reader changes need calling out:
"; "(";\n security-finding") read as alane cause in
laneCauseand cleared the label. The new test shows it.refusalWriteschange, an old-format person refusal at an unchanged head whoselabel a person removed would be posted again and relabeled.
The readers that look only at marker lines or the last line are unaffected:
sinceAt,isPartial,recordLines,priorRefusal,liftBlockerandforeignMarker(the new body addsno
<!--line), and the Python_self_writtenandbabysit_whole_review.records.Verification
All results are local runs.
node --test .github/scripts/pr-merge/enable-auto-merge.test.mjs: 186 pass.node --test .github/scripts/pr-merge/clear-escalations.test.mjs: 105 pass.node --test .github/scripts/pr-unblock/verify-notes.test.mjs: 24 pass, unchanged by the move.bash scripts/ci-hold-human-gated.test.sh: exit 0;shellcheckis clean.the fixtures that now expect wrapped bodies;
security-findingcase cleared the label).comment;
scripts/check-changelog-fragments.sh --checkand--check-required origin/main: pass.Related
quote()in verify-notes.🤖 Generated with Claude Code