Description
In scripts/auto-close-duplicates.ts (lines 123-141), there is a mismatch between how issues are paginated and how they are filtered:
- Issues are fetched from the API without specifying a sort parameter (defaults to sorting by
updated time)
- But the filtering logic checks
created_at <= threeDaysAgo
This mismatch means:
- An issue created 10 days ago but updated 1 hour ago will appear early in pagination
- An issue created 2 days ago but not updated recently may not appear until later pages
- This can cause the script to miss issues that should be processed or process them inefficiently
Expected Behavior
The sort parameter and the filter condition should be aligned — either:
- Sort by
created time explicitly and filter by created_at, or
- Sort by
updated time and filter by updated_at
Suggested Fix
Add sort=created to the API request to align with the created_at filter logic.
Description
In
scripts/auto-close-duplicates.ts(lines 123-141), there is a mismatch between how issues are paginated and how they are filtered:updatedtime)created_at <= threeDaysAgoThis mismatch means:
Expected Behavior
The sort parameter and the filter condition should be aligned — either:
createdtime explicitly and filter bycreated_at, orupdatedtime and filter byupdated_atSuggested Fix
Add
sort=createdto the API request to align with thecreated_atfilter logic.