duplicate-issues.yml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. name: duplicate-issues
  2. on:
  3. issues:
  4. types: [opened]
  5. jobs:
  6. check-duplicates:
  7. runs-on: blacksmith-4vcpu-ubuntu-2404
  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. - uses: ./.github/actions/setup-bun
  17. - name: Install opencode
  18. run: curl -fsSL https://opencode.ai/install | bash
  19. - name: Check for duplicate issues
  20. env:
  21. OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
  22. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  23. OPENCODE_PERMISSION: |
  24. {
  25. "bash": {
  26. "*": "deny",
  27. "gh issue*": "allow"
  28. },
  29. "webfetch": "deny"
  30. }
  31. run: |
  32. opencode run -m opencode/claude-haiku-4-5 "A new issue has been created:'
  33. Issue number:
  34. ${{ github.event.issue.number }}
  35. Lookup this issue and search through existing issues (excluding #${{ github.event.issue.number }}) in this repository to find any potential duplicates of this new issue.
  36. Consider:
  37. 1. Similar titles or descriptions
  38. 2. Same error messages or symptoms
  39. 3. Related functionality or components
  40. 4. Similar feature requests
  41. If you find any potential duplicates, please comment on the new issue with:
  42. - A brief explanation of why it might be a duplicate
  43. - Links to the potentially duplicate issues
  44. - A suggestion to check those issues first
  45. Use this format for the comment:
  46. 'This issue might be a duplicate of existing issues. Please check:
  47. - #[issue_number]: [brief description of similarity]
  48. Feel free to ignore if none of these address your specific case.'
  49. Additionally, if the issue mentions keybinds, keyboard shortcuts, or key bindings, please add a comment mentioning the pinned keybinds issue #4997:
  50. 'For keybind-related issues, please also check our pinned keybinds documentation: #4997'
  51. If no clear duplicates are found, do not comment."