- Fix 14 unused-parameter warnings (rename to _) - Fix 2 redefines-builtin-id (max→maxCount, min→minInt) - Fix 3 indent-error-flow issues with gofmt - Merged duplicate bd-126 into bd-116
Reduced cyclomatic complexity from 71 to ~10 by extracting 7 phase functions: - getOrCreateStore: Store initialization - handlePrefixMismatch: Prefix validation/renaming - handleCollisions: Collision detection/resolution - upsertIssues: Issue creation/updates - importDependencies: Dependency imports (optimized with set-based deduplication) - importLabels: Label imports - importComments: Comment imports (fixed idempotency bug) Additional improvements: - Fixed comment deduplication to use author+text only (not timestamp) - Optimized dependency imports to fetch once per issue (not per dependency) - Improved error messages to reference CLI flags - Renamed importIssues -> upsertIssues for clarity Main function reduced from 317 lines to 50 lines. All tests pass. Amp-Thread-ID: https://ampcode.com/threads/T-aa67a4e5-b35d-4ba6-a954-5d9ff86c15bf Co-authored-by: Amp <amp@ampcode.com>