forked from dyad-sh/dyad
-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (58 loc) · 2.7 KB
/
duplicate-issues.yml
File metadata and controls
72 lines (58 loc) · 2.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# This was copied from https://github.com/sst/opencode/blob/d7a9f343c53d481802c134ce25691a8c150d59d2/.github/workflows/duplicate-issues.yml
# MIT License
# Copyright (c) 2025 opencode
name: Duplicate Issue Detection
on:
issues:
types: [opened]
jobs:
check-duplicates:
environment: ai-bots
runs-on: ubuntu-latest
permissions:
contents: read
issues: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install opencode
run: curl -fsSL https://opencode.ai/install | bash
- name: Check for duplicate issues
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENCODE_PERMISSION: |
{
"bash": {
"gh issue*": "allow",
"*": "deny"
},
"webfetch": "deny"
}
run: |
opencode run -m anthropic/claude-sonnet-4-20250514 "A new issue has been created:'
Issue number:
${{ github.event.issue.number }}
Thoroughly lookup this issue and search through all existing issues (excluding #${{ github.event.issue.number }}) in this repository to find any potential duplicates of this new issue. Carefully consider all related issues and search using relevant keywords to ensure a comprehensive search.
Consider:
1. Similar titles or descriptions
2. Same error messages or symptoms
3. Related functionality or components
4. Similar feature requests
For each potential duplicate you find, assign a confidence rating (high, medium, or low) indicating how likely it is to be a match.
If you find any potential duplicates, please comment on the new issue with:
- A brief explanation of why it might be a duplicate
- Links to the potentially duplicate issues
- A confidence assessment (high/medium/low) for each
- A suggestion to check those issues first
Use this format for the comment:
'This issue might be a duplicate of existing issues. Please check:
- #[issue_number]: [brief description of similarity] (confidence: [high/medium/low])
Feel free to ignore if none of these address your specific case.'
Examples:
- #123: Contains identical error message and affects same component (confidence: high)
- #124: Similar feature request but slightly different use case (confidence: medium)
- #125: Mentions a related symptom, but context is unclear (confidence: low)
If no clear duplicates are found, do not comment."