Steve Yegge
fe30e0c527
Refactor importIssuesCore to reduce complexity (bd-55)
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>
2025-10-25 10:26:56 -07:00
..
2025-10-21 13:59:19 -07:00
2025-10-24 12:40:56 -07:00
2025-10-24 15:06:27 -07:00
2025-10-22 11:30:57 -07:00
2025-10-24 00:56:18 -07:00
2025-10-20 21:08:49 -07:00
2025-10-24 16:35:40 -07:00
2025-10-24 12:46:47 -07:00
2025-10-23 14:14:22 -07:00
2025-10-23 14:14:22 -07:00
2025-10-22 13:59:58 -07:00
2025-10-22 13:59:58 -07:00
2025-10-22 13:59:58 -07:00
2025-10-24 12:40:56 -07:00
2025-10-20 21:08:49 -07:00
2025-10-24 12:27:07 -07:00
2025-10-20 21:08:49 -07:00
2025-10-20 21:08:49 -07:00
2025-10-24 21:51:30 -07:00
2025-10-24 00:56:18 -07:00
2025-10-24 12:46:47 -07:00
2025-10-24 16:35:40 -07:00
2025-10-20 21:08:49 -07:00
2025-10-20 21:08:49 -07:00
2025-10-20 21:08:49 -07:00
2025-10-24 13:45:04 -07:00
2025-10-24 13:45:04 -07:00
2025-10-24 12:27:07 -07:00
2025-10-20 21:08:49 -07:00
2025-10-24 00:56:18 -07:00
2025-10-24 11:59:11 -07:00
2025-10-24 21:34:56 -07:00
2025-10-23 23:08:02 -07:00
2025-10-23 10:25:13 -07:00
2025-10-23 10:25:13 -07:00
2025-10-23 18:41:54 -07:00
2025-10-25 10:26:56 -07:00
2025-10-25 10:26:56 -07:00
2025-10-24 13:45:04 -07:00
2025-10-23 10:58:35 -07:00
2025-10-24 22:22:28 -07:00
2025-10-24 12:40:56 -07:00
2025-10-24 00:56:18 -07:00
2025-10-21 19:53:27 -07:00
2025-10-20 21:08:49 -07:00
2025-10-24 15:28:23 -07:00
2025-10-20 21:08:49 -07:00
2025-10-20 21:08:49 -07:00
2025-10-22 12:24:08 -07:00
2025-10-24 11:59:11 -07:00
2025-10-24 16:35:40 -07:00
2025-10-21 14:10:26 -07:00
2025-10-20 21:08:49 -07:00
2025-10-21 14:56:18 -07:00
2025-10-20 21:08:49 -07:00
2025-10-24 12:27:07 -07:00
2025-10-24 10:07:05 -07:00
2025-10-24 17:06:22 -07:00
2025-10-24 00:56:18 -07:00
2025-10-20 21:08:49 -07:00
2025-10-24 22:17:06 -07:00
2025-10-24 00:56:18 -07:00
2025-10-24 22:36:06 -07:00
2025-10-22 23:05:00 -07:00
2025-10-24 15:28:23 -07:00