Skip to content

Commit 02cfdfb

Browse files
committed
ci: add duplicate issue detection workflow
1 parent 1ec71e4 commit 02cfdfb

1 file changed

Lines changed: 50 additions & 0 deletions

File tree

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Duplicate Issue Detection
2+
3+
on:
4+
issues:
5+
types: [opened]
6+
7+
jobs:
8+
check-duplicates:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
issues: write
13+
id-token: write
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 1
19+
20+
- name: Install opencode
21+
run: curl -fsSL https://opencode.ai/install | bash
22+
23+
- name: Check for duplicate issues
24+
env:
25+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
run: |
28+
opencode run "A new issue has been created: '${{ github.event.issue.title }}'
29+
30+
Issue body:
31+
${{ github.event.issue.body }}
32+
33+
Please search through existing issues in this repository to find any potential duplicates of this new issue. Consider:
34+
1. Similar titles or descriptions
35+
2. Same error messages or symptoms
36+
3. Related functionality or components
37+
4. Similar feature requests
38+
39+
If you find any potential duplicates, please comment on the new issue with:
40+
- A brief explanation of why it might be a duplicate
41+
- Links to the potentially duplicate issues
42+
- A suggestion to check those issues first
43+
44+
Use this format for the comment:
45+
'👋 This issue might be a duplicate of existing issues. Please check:
46+
- #[issue_number]: [brief description of similarity]
47+
48+
If none of these address your specific case, please let us know how this issue differs.'
49+
50+
If no clear duplicates are found, do not comment."

0 commit comments

Comments
 (0)