mirror of
https://github.com/tiennm99/litellm.git
synced 2026-06-26 17:05:56 +00:00
c7d3198d9a
Fixes "Input must be provided either through stdin or as a prompt argument" error by moving the prompt to a PROMPT env variable instead of inline multiline shell string.
49 lines
1.9 KiB
YAML
49 lines
1.9 KiB
YAML
name: Check Duplicate Issues
|
|
|
|
on:
|
|
issues:
|
|
types: [opened]
|
|
|
|
jobs:
|
|
check-duplicates:
|
|
if: github.event.action == 'opened'
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
issues: write
|
|
steps:
|
|
- name: Install Claude Code
|
|
run: npm install -g @anthropic-ai/claude-code
|
|
|
|
- name: Check duplicates
|
|
env:
|
|
ANTHROPIC_API_KEY: ${{ secrets.LITELLM_VIRTUAL_KEY }}
|
|
ANTHROPIC_BASE_URL: ${{ secrets.LITELLM_BASE_URL }}
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
PROMPT: |
|
|
A new issue has been created in the ${{ github.repository }} repository.
|
|
|
|
Issue number: ${{ github.event.issue.number }}
|
|
|
|
Lookup this issue with gh issue view ${{ github.event.issue.number }} --repo ${{ github.repository }}.
|
|
|
|
Search through existing issues (excluding #${{ github.event.issue.number }}) to find potential duplicates.
|
|
|
|
Use gh issue list --repo ${{ github.repository }} with relevant search terms from the new issue's title and description. Try multiple keyword combinations to search broadly. Check both open and recently closed issues.
|
|
|
|
Consider:
|
|
1. Similar titles or descriptions
|
|
2. Same error messages or symptoms
|
|
3. Related functionality or components
|
|
4. Similar feature requests
|
|
|
|
If you find potential duplicates, post a SINGLE comment on issue #${{ github.event.issue.number }} using gh issue comment ${{ github.event.issue.number }} --repo ${{ github.repository }} with this format:
|
|
|
|
_This comment was generated by an LLM and may be inaccurate._
|
|
|
|
This issue might be a duplicate of existing issues. Please check:
|
|
- #[issue_number]: [brief description of similarity]
|
|
|
|
If you find NO duplicates, do NOT post any comment. Stay silent.
|
|
run: claude -p "$PROMPT" --model sonnet --max-turns 10 --allowedTools "Bash(gh issue *)"
|