-
Notifications
You must be signed in to change notification settings - Fork 4
chore: fix Claude sticky comments in PR reviews #407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Sticky comments only work when Claude uses the default Claude[bot] user. When we pass a custom token, it uses git github-actions[bot] user and sticky comments don't work.
🔍 PR Review: #407 - Fix Claude Sticky Comments in PR Reviews✅ APPROVED - Excellent Fix!This PR correctly addresses a critical issue with Claude's sticky comment functionality in PR reviews. The change is minimal, correct, and well-justified. 📋 SummaryChange: Removed Impact:
Files Changed: 1 file, 2 lines deleted
✅ CRITICAL CHECKS - ALL PASSED1. ✅ Commit Message - PASSEDAssessment: Perfect conventional commit format
2. ✅ Code Quality - PASSEDYAML Syntax: ✅ Valid (verified with Python YAML parser) Reusable Workflow Contract: ✅ Preserved
3. ✅ Technical Correctness - PASSEDRoot Cause Analysis: According to the claude-code-action documentation, the When
When
Why This Matters: The PR workflow at use_sticky_comment: true # Line 22This feature consolidates all Claude responses into a single, updated comment—cleaner for PR reviews. The fix ensures this works as intended. 4. ✅ Test Coverage - N/A (Infrastructure Change)No tests required: This is a GitHub Actions workflow configuration change. There are no workflow-specific tests in the repository, which is standard practice. Verification: Manual testing in CI (this PR will validate the fix when merged) 5. ✅ Architecture Compliance - PASSEDModulith Architecture: N/A (workflow change, not code) Workflow Architecture: ✅ Follows reusable workflow pattern correctly
6. ✅ Security & Medical Device Compliance - PASSEDSecurity Analysis: ✅ More Secure: Removing the explicit
✅ No Secrets Exposure:
✅ Permissions Model:
Medical Device Compliance: ✅ No impact
7. ✅ Documentation - ACCEPTABLE (Minor Suggestion)Current State: PR description is clear and accurate. Suggestion (Non-blocking): ### Claude Code Action Configuration
**IMPORTANT**: Do NOT pass `github_token` parameter to `anthropics/claude-code-action`.
**Rationale**:
- Sticky comments only work with default `claude[bot]` identity
- Passing `github_token` causes comments to use `github-actions[bot]` instead
- The action automatically uses Claude App token when `github_token` is omitted
**Correct Usage**:
```yaml
uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
use_sticky_comment: true # This works!
# ❌ DO NOT ADD: github_token: ${{ secrets.GITHUB_TOKEN }}Reference: PR #407 PR #123 opened → Claude reviews → creates comment as PR #123 opened → Claude reviews → creates comment as |
Codecov Report✅ All modified and coverable lines are covered by tests. |
|



Sticky comments only work when Claude uses the default Claude[bot] user. When we pass a custom token, it uses git github-actions[bot] user and sticky comments don't work.