fix(workflow): prevent circular duplicate closure in auto-close script
- Skip closing an issue as duplicate of another that is already closed (avoids circular closure when bot and human close in opposite order). - Skip when duplicate target is self (same issue number). - Extract testable helpers: isDupeComment, isDupeCommentOldEnough, authorDisagreedWithDupe, getLastDupeComment, decideAutoClose. - Add 23 unit tests (Bun) and run them in CI before auto-close step. - Add scripts/AUTO_CLOSE_DUPLICATES_CROSS_VERIFY.md for impact summary. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -22,6 +22,9 @@ jobs:
|
||||
with:
|
||||
bun-version: latest
|
||||
|
||||
- name: Run auto-close-duplicates tests
|
||||
run: bun test scripts/auto-close-duplicates
|
||||
|
||||
- name: Auto-close duplicate issues
|
||||
run: bun run scripts/auto-close-duplicates.ts
|
||||
env:
|
||||
|
||||
Reference in New Issue
Block a user