Skip to content

fix: prevent GitHub issue auto-linking in Claude auto-review comments#40

Merged
bkrem merged 1 commit intomasterfrom
fix/claude-auto-review-issue-refs
Oct 15, 2025
Merged

fix: prevent GitHub issue auto-linking in Claude auto-review comments#40
bkrem merged 1 commit intomasterfrom
fix/claude-auto-review-issue-refs

Conversation

@bkrem
Copy link
Member

@bkrem bkrem commented Oct 15, 2025

Summary

Fixes an issue where Claude auto-reviews use #number syntax (e.g., #1, #2, #3) to number issues, which GitHub automatically interprets as references to repository issues/PRs, causing confusion by linking to unrelated issues.

Screenshot 2025-10-15 at 13 56 52

Changes

  • Added explicit formatting instructions to the auto-review prompt in claude/auto-review/action.yml
  • Instructs Claude to use "Issue 1", "Issue 2", or "(1)", "(2)" format instead of "feat: adds deploy infra action #1" format
  • Only allows #number syntax when explicitly referencing actual GitHub issues/PRs

Example Impact

Before:

✅ Issue #1: RESOLVED - s3:PutObjectAcl Removed
❌ Issue #6: NOT ADDRESSED - Missing Upload Policy ARN Output

(GitHub auto-links #1 and #6 to unrelated repository issues)

After:

✅ Issue 1: RESOLVED - s3:PutObjectAcl Removed
❌ Issue 6: NOT ADDRESSED - Missing Upload Policy ARN Output

(No auto-linking, clear numbering maintained)

Test Plan

  • Verified prompt modification syntax is correct
  • Trigger auto-review action on a test PR to confirm new formatting behavior
  • Verify no #number references appear in review comments (except for legitimate issue/PR references)

Adds explicit formatting instructions to the auto-review prompt to prevent
Claude from using #number syntax when numbering issues in reviews. This
prevents GitHub from auto-linking to unrelated repository issues/PRs.

The prompt now instructs Claude to use "Issue 1" or "(1)" format instead
of "#1" format, only using #number when explicitly referencing actual
GitHub issues.
@bkrem bkrem requested review from arein and geekbrother October 15, 2025 11:59
@bkrem bkrem merged commit 3c755d4 into master Oct 15, 2025
@bkrem bkrem deleted the fix/claude-auto-review-issue-refs branch October 15, 2025 15:08
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.

2 participants