π fix: a merged pull request comments on a slice GitHub already closed
Merged
AT
1mo ago+61+61+01234567890123456789-15-15-01234567890123456789
Slice: #128
Fixes State #132 of P-45: when a pull request also said "Closes #N", GitHub closed the slice before the merged job ran, and the job skipped closed slices, so the slice got no comment linking the pull request that built it.
src/work.ts,prMerged: every Slice the pull request names gets one comment "Built in #PR, merged into .", whether it is still open or closed already. It reads the slice's comments first, and one that already says "Built in #PR" (that number exactly, not #PR0) means no second comment, as when the job runs again. An open slice is still closed as completed. A refused comment on a closed slice says "cannot comment on #N", with the same hint for a workflow that grants noissues: write.- README: the merged-job paragraph says so.
- Tests: a slice GitHub closed gets the comment; a slice that has it, open or closed, gets none again (an open one is still closed); a comment naming another pull request does not count; a refused comment on a closed slice.
pnpm check passes (870 tests, work.ts 100% lines).
π€ Generated with Claude Code
Summary by cubic
Fixes the merged-pull-request job so a slice GitHub already closed still gets the comment linking the pull request that built it. Previously the job skipped closed slices, so no comment was posted when the PR also said "Closes #N" next to the slice line.
Bug Fixes
- Every slice a pull request names gets one "Built in #PR, merged into ." comment, whether it is open or closed; a slice that already has the comment gets no second one, and an open slice is still closed as completed.
- A refused comment on a closed slice now reports "cannot comment on #N" with the same hint about granting
issues: writein the client workflow.