Skip to content

feat: Add native GitHub issue-branch linking and closingIssuesReferences fallback - #53

Merged
sylvansys merged 1 commit into
mainfrom
52-fix/review-prs-49-51-and-then-see-if-we-can-
Jan 23, 2026
Merged

feat: Add native GitHub issue-branch linking and closingIssuesReferences fallback#53
sylvansys merged 1 commit into
mainfrom
52-fix/review-prs-49-51-and-then-see-if-we-can-

Conversation

@sylvansys

Copy link
Copy Markdown
Contributor

Summary

  • Add hook script for native GitHub branch-issue linking using createLinkedBranch mutation
  • Add closingIssuesReferences GraphQL fallback to requirements-reviewer
  • Configure SessionStart hook in settings.json

Changes

New: .claude/hooks/link-branch-to-issue.sh

Hook script that:

  • Uses GitHub's native createLinkedBranch mutation for new branches (creates proper "Development" section link)
  • Falls back to local tracking when branch already exists on remote
  • Updates .claude/logs/branch-issues.json as a cache

Updated: .github/actions/requirements-reviewer/action.yml

Added third fallback for issue detection:

  1. Branch name parsing (123-feature → #123)
  2. PR body keywords (Closes #X, Fixes #X, Resolves #X)
  3. New: GitHub's closingIssuesReferences GraphQL API

Updated: .claude/settings.json

Added SessionStart hook configuration to run the link script when ISSUE_NUMBER is provided.

Why This Matters

Closes #52

Test plan

  • Verify hook script syntax with bash -n
  • Test hook script manually with existing branch (falls back correctly)
  • Test with new branch creation (uses createLinkedBranch)
  • Create test PR to verify closingIssuesReferences fallback

🤖 Generated with Claude Code

…ss.\n\nSession-ID: 579d5b4c-f770-40e8-8489-0d22372479ff\nSession-Timestamp: 2026-01-23T03:48:55.746Z\nBranch: 52-fix/review-prs-49-51-and-then-see-if-we-can-\n\n🤖 Generated with [Claude Code](https://claude.com/claude-code)\n\nCo-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@sylvansys
sylvansys merged commit 38a3b80 into main Jan 23, 2026
@sylvansys
sylvansys deleted the 52-fix/review-prs-49-51-and-then-see-if-we-can- branch January 23, 2026 03:51
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.

Plan: PR Review & Issue-Branch Linking Solution

1 participant