You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] gh_issues.py cross-ref misses PRs linked via Refs: instead of Closes/Fixes #121
The _build_cross_refs function in scripts/gh_issues.py only detects issue↔PR links via branch name matching and Closes/Fixes/Resolves keywords in PR bodies. It does not detect Refs: #<number> — which is the project's standard commit/PR reference format (see CLAUDE.md).
Problem
PR #106 merged with Refs: #102 in its body. GitHub did not auto-close issue #102 and did not create a formal PR↔issue link because Refs: is not a GitHub closing keyword. The gh-issues table also fails to show the PR↔issue cross-reference since _build_cross_refs doesn't parse Refs:.
Expected Behavior
_build_cross_refs should also match Refs: #<number> (and comma-separated variants like Refs: #102, #103) in PR bodies to build the issue↔PR mapping.
Reproduction
Create a PR whose body contains Refs: #102 (no Closes/Fixes)
Problem:_build_cross_refs only detects issue↔PR links via branch names and Closes/Fixes/Resolves keywords. The project uses Refs: #<n> as the standard format (CLAUDE.md), which GitHub does not auto-link.
Solution: Add a regex Refs:\s*#(\d+) (with comma-separated support) alongside _CLOSING_RE in _build_cross_refs. Both regexes feed into the same linked set — no structural change.
Files:scripts/gh_issues.py only.
Testing: Add unit tests in tests/test_gh_issues.py for Refs: #102 and Refs: #102, #103 (TDD: test first, then implementation).
Task 1: Add failing unit tests for Refs: #N and Refs: #N, #M in tests/test_gh_issues.py — verify: pytest tests/test_gh_issues.py::TestBuildCrossRefs -v
Task 2: Add _REFS_RE regex and use it in _build_cross_refs in scripts/gh_issues.py — verify: pytest tests/test_gh_issues.py::TestBuildCrossRefs -v
Activity
gerchowl commentedon Feb 21, 2026
Design
Problem:
_build_cross_refsonly detects issue↔PR links via branch names andCloses/Fixes/Resolveskeywords. The project usesRefs: #<n>as the standard format (CLAUDE.md), which GitHub does not auto-link.Solution: Add a regex
Refs:\s*#(\d+)(with comma-separated support) alongside_CLOSING_REin_build_cross_refs. Both regexes feed into the samelinkedset — no structural change.Files:
scripts/gh_issues.pyonly.Testing: Add unit tests in
tests/test_gh_issues.pyforRefs: #102andRefs: #102, #103(TDD: test first, then implementation).gerchowl commentedon Feb 21, 2026
Implementation Plan
Issue: #121
Branch: bugfix/121-cross-ref-misses-refs-linked-prs
Tasks
tests/test_gh_issues.py— verify:pytest tests/test_gh_issues.py::TestBuildCrossRefs -vscripts/gh_issues.py— verify:pytest tests/test_gh_issues.py::TestBuildCrossRefs -vtest(gh-issues): add tests for Refs: keyword in cross-refs
fix(gh-issues): detect Refs: #N in PR bodies for cross-refs
docs(changelog): add entry for Refs: cross-ref fix
gerchowl commentedon Feb 21, 2026
Autonomous Run Complete
fix(gh-issues): detect Refs: #N in PR bodies for cross-refs (#121) (#150