duplicate-issues.yml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. OPENCODE_PERMISSION: '{ "bash": { "gh*": "allow", "*": "deny" }, "webfetch": "deny" }'
  23. run: |
  24. opencode run -m anthropic/claude-sonnet-4-20250514 "A new issue has been created: '${{ github.event.issue.title }}'
  25. Issue number:
  26. ${{ github.event.issue.number }}
  27. Issue body:
  28. ${{ github.event.issue.body }}
  29. Please search through existing issues (excluding #${{ github.event.issue.number }}) in this repository to find any potential duplicates of this new issue.
  30. Consider:
  31. 1. Similar titles or descriptions
  32. 2. Same error messages or symptoms
  33. 3. Related functionality or components
  34. 4. Similar feature requests
  35. If you find any potential duplicates, please comment on the new issue with:
  36. - A brief explanation of why it might be a duplicate
  37. - Links to the potentially duplicate issues
  38. - A suggestion to check those issues first
  39. Use this format for the comment:
  40. '👋 This issue might be a duplicate of existing issues. Please check:
  41. - #[issue_number]: [brief description of similarity]
  42. If none of these address your specific case, please let us know how this issue differs.'
  43. If no clear duplicates are found, do not comment."