Fix duplicate pollution: filter closed issues from detection
- Closed issues no longer appear in duplicate scans - Prevents infinite reappearance of merged duplicates - Deleted 29 low-value closed issues to shrink DB - Closes bd-c577 Amp-Thread-ID: https://ampcode.com/threads/T-51165824-9559-4696-919f-2c40459d5ef9 Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -45,12 +45,20 @@ Example:
|
||||
// Get all issues
|
||||
allIssues, err := store.SearchIssues(ctx, "", types.IssueFilter{})
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error fetching issues: %v\n", err)
|
||||
os.Exit(1)
|
||||
fmt.Fprintf(os.Stderr, "Error fetching issues: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
// Find duplicates
|
||||
duplicateGroups := findDuplicateGroups(allIssues)
|
||||
// Filter out closed issues - they're done, no point detecting duplicates
|
||||
openIssues := make([]*types.Issue, 0, len(allIssues))
|
||||
for _, issue := range allIssues {
|
||||
if issue.Status != types.StatusClosed {
|
||||
openIssues = append(openIssues, issue)
|
||||
}
|
||||
}
|
||||
|
||||
// Find duplicates (only among open issues)
|
||||
duplicateGroups := findDuplicateGroups(openIssues)
|
||||
|
||||
if len(duplicateGroups) == 0 {
|
||||
if !jsonOutput {
|
||||
|
||||
Reference in New Issue
Block a user