duplicate-issues.yml 1.7 KB

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