-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add duplicate issue detection bot #1438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
This comment was marked as off-topic.
This comment was marked as off-topic.
Greptile SummaryAdded a GitHub Actions workflow that automatically detects duplicate issues using OpenCode CLI with Claude Haiku 4.5, triggering on new issue creation to search for similar existing issues and post comments when duplicates are found. Critical Issues:
Minor Issues:
Confidence Score: 0/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant GitHub
participant Workflow as duplicate_issue_detection.yml
participant OpenCode as OpenCode CLI
participant Claude as Claude Haiku 4.5
participant GH as GitHub CLI
User->>GitHub: Opens new issue
GitHub->>Workflow: Triggers workflow (issue.opened)
Workflow->>Workflow: Checkout repository (fetch-depth: 1)
Workflow->>OpenCode: Install via curl | bash
OpenCode-->>Workflow: Installed
Workflow->>OpenCode: Run with prompt + issue number
OpenCode->>Claude: Send prompt to analyze issue
Claude->>GH: gh issue view (new issue)
GH-->>Claude: Issue details
Claude->>GH: gh issue list (search existing)
GH-->>Claude: List of issues
Claude->>Claude: Compare for duplicates
alt Duplicates found
Claude->>GH: gh issue comment (add duplicate notice)
GH->>GitHub: Post comment on issue
GitHub-->>User: Notification with duplicates
else No duplicates
Claude->>OpenCode: No action needed
end
OpenCode-->>Workflow: Complete
Workflow-->>GitHub: Workflow complete
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 file reviewed, 3 comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 issue found across 1 file
Prompt for AI agents (all 1 issue)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name=".github/workflows/duplicate_issue_detection.yml">
<violation number="1" location=".github/workflows/duplicate_issue_detection.yml:35">
P2: Mismatched quote: the string starts with `"` but has a stray `'` after 'created:'. This single quote will be included literally in the prompt, which appears unintentional. Remove the single quote to fix the prompt text.</violation>
</file>
Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 issue found across 1 file (changes from recent commits).
Prompt for AI agents (all 1 issue)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name=".github/workflows/duplicate_issue_detection.yml">
<violation number="1" location=".github/workflows/duplicate_issue_detection.yml:40">
P2: The prompt now instructs searching PRs, but `OPENCODE_PERMISSION` only allows `gh issue*` commands. Add `"gh pr*": "allow"` to the permissions to enable PR searching, or the AI will fail when attempting to use `gh pr` commands.</violation>
</file>
Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR
why
Duplicate issues take up a lot of review time for us to find and link them together.
what changed
This bot will leave comments like this on new issues when dupes are found:
Summary by cubic
Adds a GitHub Action that scans new issues for potential duplicates across issues and PRs, and comments with links when matches are found. This helps reduce triage time by flagging dupes at creation.
Written for commit 8ef0fb9. Summary will update automatically on new commits.