Skip to content

ci: Read closing Issues from the PR body - #54

Merged
idy merged 5 commits into
mainfrom
claude/pr-body-closing-keywords
Sep 30, 2026
Merged

idy merged 5 commits into
mainfrom
claude/pr-body-closing-keywords

Conversation

@idy

@idy idy commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

Closes #53

Summary

  • Take a pull request's closing Issues from the closing keywords in its body (Closes #N, fixes owner/repo#N, an Issue URL, …) instead of GraphQL closingIssuesReferences. GitHub stopped deriving those references around 2026-09-30 07:00 UTC, so PRs that say Closes #N were blocked on pr-linkage (h2vivi/firmwares #1477 and #1479, GizClaw/gizos #617).
  • New pr-readiness/closing-issues.mjs parses the body, reads up to 100 referenced Issues in one aliased GraphQL request, and normalizes them. The reusable workflow's context step and verify.mjs both use it, replacing their duplicated Issue normalization.
  • Keywords inside fenced, inline, or indented code, block quotes, and HTML comments declare nothing; a plain mention does not count; a reference that is not a readable Issue (a pull request, a missing number, an inaccessible repository) is ignored; any other GraphQL failure fails closed; more than 100 references still report too-many-closing-issues.
  • analyzePullRequest and the snapshot shape are unchanged. The body was already hashed, so changing a closing reference still invalidates the snapshot.
  • Both reviewer sparse checkouts add .github/scripts/review-request, whose stripQuotedText the parser reuses.
  • Issue events still find PRs through closedByPullRequestsReferences; a PR GitHub has not linked is refreshed by its next event or an @codex review comment.

This PR itself cannot pass the currently deployed pr-linkage rule for the reason it fixes: GitHub does not create the native link for Closes #53.

Validation

  • node .github/scripts/pr-review/test.mjs
  • node .github/scripts/review-request/test.mjs
  • node .github/scripts/pr-readiness/test.mjs
  • node .github/scripts/issue-review/test.mjs
  • actionlint -ignore 'property "workflow_(repository|sha)" is not defined' .github/workflows/*.yml
  • git diff --check
  • Live read against GitHub with the collector: h2vivi/firmwares PR #1479's body returns Issue #1478; closes #1479 (a pull request), closes #999999, and closes nobody-xyz/none#1 are ignored.
  • Not run: the workflow itself on GitHub Actions. The context step's dynamic import follows the existing review-request/common.mjs import in the resolve job, and the step is executed by pr-review/test.mjs against a fake client.

🤖 Generated with Claude Code

The reviewer took a pull request's closing Issues from GraphQL
closingIssuesReferences. GitHub stopped deriving those from closing
keywords, so PRs whose body says "Closes #N" were blocked on pr-linkage.
The closing Issues are now the ones the body names with a closing keyword,
read in one GraphQL request; Development links are no longer consulted.

Closes #53

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ OpenAI PR Review: FAIL

Conclusion: Not ready. 2 readiness blockers and 1 actionable finding must be resolved before merge.

Review checks

Check Result
PR format ❌ FAIL
Issue design ✅ PASS
Code & plan conformance ❌ FAIL

Scope: b64aaeb86e · 8dac71eefa..b64aaeb86e · full · 1 diff chunk

Usage: 1m 9s · 445,688 tokens · 86.3% cache hit · credits unavailable

Blockers

  • pr-linkage Pull request must natively close at least one same-repository Issue.
  • code-review .github/scripts/pr-readiness/closing-issues.mjs:70: Ignore closing keywords in indented Markdown code blocks

Findings

1 inline finding published.

Summary

The complete diff review found one actionable closing-Issue parsing defect. No linked Issue context or discussion was supplied, and the chunk review reported no plan-conformance blockers.

Review metadata
  • Commit: b64aaeb86e
  • Range: 8dac71eefa..b64aaeb86e
  • Mode: full
  • Diff chunks: 1
  • Model: gpt-6-sol
  • Reasoning effort: low
  • Session: repo-1309321116-pr-54-v2
  • Generation: 48787219649b9184ccab9e27a8e923d9da370954c5a8cbcfef3425e477bf29ca
  • Evidence: 8f8c6a2a4cd419fdc9eeb822b6f8da8a022a0c9d108099c4c75a0da919e77350

Totals

  • Input: 442,043
  • Cached input: 381,692
  • Cache write: 59,263
  • Output: 3,645
  • Reasoning: 770
  • Total: 445,688
  • Estimated credits: unavailable for this model
Token and cache details
Stage Mode Target Time Input Cached Hit Output Total Credits
pr deterministic format rules 0s 0 0 0.0% 0 0 N/A
pr full pr 10s 43,976 28,215 64.2% 535 44,511 N/A
code full chunk 1/1 49s 312,231 270,435 86.6% 2,559 314,790 N/A
code full aggregate 10s 85,836 83,042 96.7% 551 86,387 N/A

Comment thread .github/scripts/pr-readiness/closing-issues.mjs
idy and others added 2 commits September 30, 2026 18:09
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ OpenAI PR Review: FAIL

Conclusion: Not ready. 2 readiness blockers and 1 actionable finding must be resolved before merge.

Review checks

Check Result
PR format ❌ FAIL
Issue design ✅ PASS
Code & plan conformance ❌ FAIL

Scope: acb90efe4b · b64aaeb86e..acb90efe4b · incremental · 1 diff chunk

Usage: 40s · 288,565 tokens · 66.2% cache hit · credits unavailable

Blockers

  • pr-linkage Pull request must natively close at least one same-repository Issue.
  • code-review .github/scripts/pr-readiness/closing-issues.mjs:29: Exclude indented code nested under list items

Findings

1 inline finding published.

Summary

The incremental patch fixes the previously reported top-level indented-code case. One actionable case remains: indented code nested under a list item can still be treated as closing-Issue linkage.

Review metadata
  • Commit: acb90efe4b
  • Range: b64aaeb86e..acb90efe4b
  • Mode: incremental
  • Diff chunks: 1
  • Model: gpt-6-sol
  • Reasoning effort: low
  • Session: repo-1309321116-pr-54-v2
  • Generation: 0e2ac92ba5975e9b62bf713407ea29d2f70004004bbc3fe0d788014c953869cb
  • Evidence: 67f9f9fe4f0db83e57408515a9326c77a146479b9470841a62e28e74d3ecc7b8

Totals

  • Input: 286,352
  • Cached input: 189,611
  • Cache write: 96,333
  • Output: 2,213
  • Reasoning: 1,026
  • Total: 288,565
  • Estimated credits: unavailable for this model
Token and cache details
Stage Mode Target Time Input Cached Hit Output Total Credits
pr deterministic format rules 0s 0 0 0.0% 0 0 N/A
pr incremental pr 12s 89,574 44,351 49.5% 536 90,110 N/A
code incremental chunk 1/1 20s 95,308 46,634 48.9% 1,210 96,518 N/A
code incremental aggregate 8s 101,470 98,626 97.2% 467 101,937 N/A

Comment thread .github/scripts/pr-readiness/closing-issues.mjs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ OpenAI PR Review: FAIL

Conclusion: Not ready. 2 readiness blockers and 1 actionable finding must be resolved before merge.

Review checks

Check Result
PR format ❌ FAIL
Issue design ✅ PASS
Code & plan conformance ❌ FAIL

Scope: 2c7eea2ecd · acb90efe4b..2c7eea2ecd · incremental · 1 diff chunk

Usage: 42s · 339,487 tokens · 82.4% cache hit · credits unavailable

Blockers

  • pr-linkage Pull request must natively close at least one same-repository Issue.
  • code-review .github/scripts/pr-readiness/closing-issues.mjs:52: Calculate list padding from the marker’s actual column

Findings

1 inline finding published.

Summary

The patch fixes the previous finding for space-padded list items. One actionable case remains for tab-padded list items.

Review metadata
  • Commit: 2c7eea2ecd
  • Range: acb90efe4b..2c7eea2ecd
  • Mode: incremental
  • Diff chunks: 1
  • Model: gpt-6-sol
  • Reasoning effort: low
  • Session: repo-1309321116-pr-54-v2
  • Generation: aff86b530226f1ab73ba51fce330a7fb43dc1f71e9e481bfb919b17f328dfea4
  • Evidence: 3933388c189157de732eec91769b6226a7c0a7700f6343760739db2401b2710e

Totals

  • Input: 337,214
  • Cached input: 277,745
  • Cache write: 59,061
  • Output: 2,273
  • Reasoning: 1,119
  • Total: 339,487
  • Estimated credits: unavailable for this model
Token and cache details
Stage Mode Target Time Input Cached Hit Output Total Credits
pr deterministic format rules 0s 0 0 0.0% 0 0 N/A
pr reused cached evidence 0s 0 0 0.0% 0 0 N/A
code incremental chunk 1/1 33s 220,156 163,132 74.1% 1,811 221,967 N/A
code incremental aggregate 9s 117,058 114,613 97.9% 462 117,520 N/A

Comment thread .github/scripts/pr-readiness/closing-issues.mjs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ OpenAI PR Review: FAIL

Conclusion: Not ready. 1 readiness blocker must be resolved before merge.

Review checks

Check Result
PR format ❌ FAIL
Issue design ✅ PASS
Code & plan conformance ✅ PASS

Scope: 824e0e3c5f · 2c7eea2ecd..824e0e3c5f · incremental · 1 diff chunk

Usage: 16s · 250,091 tokens · 94.8% cache hit · credits unavailable

Blockers

  • pr-linkage Pull request must natively close at least one same-repository Issue.

Summary

The incremental patch fixes the previous tab-padding finding. No actionable code findings or plan-conformance blockers remain in the aggregated review.

Review metadata
  • Commit: 824e0e3c5f
  • Range: 2c7eea2ecd..824e0e3c5f
  • Mode: incremental
  • Diff chunks: 1
  • Model: gpt-6-sol
  • Reasoning effort: low
  • Session: repo-1309321116-pr-54-v2
  • Generation: 576c1fdc4b687c6358f27f1a2eca0544588864a7a5947850c9a221b71c817f61
  • Evidence: 60909ea325d594b8bbad412f92ad72c9ac2792ecb76092cc6ccc5d095a19f86f

Totals

  • Input: 249,308
  • Cached input: 236,427
  • Cache write: 12,609
  • Output: 783
  • Reasoning: 72
  • Total: 250,091
  • Estimated credits: unavailable for this model
Token and cache details
Stage Mode Target Time Input Cached Hit Output Total Credits
pr deterministic format rules 0s 0 0 0.0% 0 0 N/A
pr reused cached evidence 0s 0 0 0.0% 0 0 N/A
code incremental chunk 1/1 9s 122,516 111,635 91.1% 455 122,971 N/A
code incremental aggregate 7s 126,792 124,792 98.4% 328 127,120 N/A

@idy
idy merged commit 9b0ee0c into main Sep 30, 2026
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: Read closing Issues from the PR body

1 participant