fix: implement GitHub API-based transfer detection#28
Conversation
Replaces time-based heuristic with proper GitHub API check to eliminate false positives when detecting transferred issues. Changes: - Added ListIssueEvents method to GitHub client for fetching issue timeline - Updated Gatekeeper to store GitHub client from dependencies - Implemented checkIfRecentlyTransferred that queries actual transfer events - Replaced CreatedAt time check with API-based detection - Fixes issue #27 where legitimate new issues were incorrectly skipped Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughThis change addresses false positives in transfer loop prevention by replacing an overly aggressive time-based heuristic with GitHub API timeline checks. It adds a method to fetch issue events and modifies Gatekeeper to distinguish transferred issues from legitimately created ones. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
Important Action Needed: IP Allowlist UpdateIf your organization protects your Git platform with IP whitelisting, please add the new CodeRabbit IP address to your allowlist:
Reviews will stop working after February 8, 2026 if the new IP is not added to your allowlist. Comment |
Summary
Fixes #27 - Replaces time-based heuristic with proper GitHub API check to eliminate false positives when detecting transferred issues.
Problem
The previous implementation used a time-based heuristic (checking if an issue was created < 2 minutes ago) to detect transferred issues. This caused false positives, incorrectly skipping legitimate new issues like #38.
Solution
ListIssueEventsmethod to GitHub client for fetching issue timeline eventscheckIfRecentlyTransferredthat queries the GitHub API for actual "transferred" eventsBenefits
Test Plan
🤖 Generated with Claude Code
Summary by CodeRabbit