duplicate-issues.yml 1.7 KB

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