Add automated duplicate for new issue detection and auto-close workflows#5276
Add automated duplicate for new issue detection and auto-close workflows#5276LantaoJin merged 10 commits intoopensearch-project:mainfrom
Conversation
Implements a 3-workflow system using claude-code-action with Bedrock OIDC: - claude-dedupe-issues.yml: detects duplicates on new issues via Claude - auto-close-duplicates.yml: daily cron closes flagged issues after 3 days - remove-autoclose-on-activity.yml: removes autoclose label on human comment Signed-off-by: Heng Qian <qianheng@amazon.com>
|
Failed to generate code suggestions for PR |
- Detected duplicates now get `duplicate` label instead of `autoclose` - Auto-close workflow looks for `duplicate` label - After closing, adds `autoclose` label - Human comment removes `duplicate` label to prevent auto-closure - Fix state_reason to `duplicate` - Change grace period to 1 hour for testing Signed-off-by: Heng Qian <qianheng@amazon.com>
- Add backfill-duplicate-comments.yml to scan historical issues for duplicates - Add thumbs-down instruction to duplicate detection comment Signed-off-by: Heng Qian <qianheng@amazon.com>
4a4c781 to
a114428
Compare
Addressed in commit 9743698 |
|
Failed to generate code suggestions for PR |
Signed-off-by: Heng Qian <qianheng@amazon.com>
- Remove unnecessary allowed_non_write_users from dedupe workflow - Pass workflow inputs via env vars to prevent JS injection in backfill - Use bash array for REPO_FLAG to prevent word splitting in shell script Signed-off-by: Heng Qian <qianheng@amazon.com>
|
Failed to generate code suggestions for PR |
Backfill workflow dispatches dedupe via API as github-actions[bot], which requires explicit allowlisting in claude-code-action. Signed-off-by: Heng Qian <qianheng@amazon.com>
|
Failed to generate code suggestions for PR |
…kflow Signed-off-by: Heng Qian <qianheng@amazon.com>
|
Failed to generate code suggestions for PR |
Read from repo variable DUPLICATE_GRACE_DAYS (default 7) instead of hardcoded 3 days for both auto-close workflow and comment script. Signed-off-by: Heng Qian <qianheng@amazon.com>
PR Reviewer Guide 🔍(Review updated until commit adc7ddd)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to adc7ddd
Previous suggestionsSuggestions up to commit 3583887
|
|
@qianheng-aws which issues will be auto-closed if there are 3 duplicated issues? |
It didn't require 3 duplicated issues to close a duplicate issues, but just shown top-3 most suspicious ones as reference. |
Only consider issues with lower issue numbers as potential originals, and exclude issues already labeled duplicate from search results. Signed-off-by: Heng Qian <qianheng@amazon.com>
Only run duplicate detection on newly created issues for now. Signed-off-by: Heng Qian <qianheng@amazon.com>
|
Persistent review updated to latest commit adc7ddd |
|
As discussed offline, remove |
|
CI failure because of |
Summary
claude-dedupe-issues.yml(LLM-invoked): triggers on new issues, uses Claude to search for potential duplicatesauto-close-duplicates.yml(NO-LLM): daily cron job closes flagged issues after a 7-day grace period(configurable by vars.DUPLICATE_GRACE_DAYS) if no objectionremove-duplicate-on-activity.yml(NO-LLM): removesduplicatelabel when a human comments, preventing auto-closureHow is works
Blew snapshots are based on the test in my personal repo
claude-dedupe-issues.ymlIt will invoke Claude Code and use
/dedupcommand(see more details in dedupe.md) to detect duplicated issue:duplicatetag will be added to this new issue otherwise(issue#14 for the blew example)duplicateissues will triggerremove-duplicate-on-activity.ymlworkflow, and it will remove that tagduplicatetag as well.auto-close-duplicates.ymlis a daily cron job closingautocloseissues which is flagged more than 7 daysTest plan
duplicatelabel is applied to detected duplicatesduplicatelabelthumb-downreaction will prevent auto closingSigned-off-by: Heng Qian qianheng@amazon.com