Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

fix: pass prompt as env var in duplicate detection workflows

Ryan Crabbec7d3198d9ac0
diff --git a/.github/workflows/check_duplicate_issues.yml b/.github/workflows/check_duplicate_issues.yml
index b5efaae50cf..b2a298bfcdc 100644
--- a/.github/workflows/check_duplicate_issues.yml
+++ b/.github/workflows/check_duplicate_issues.yml
@@ -20,32 +20,29 @@ jobs:
ANTHROPIC_API_KEY: ${{ secrets.LITELLM_VIRTUAL_KEY }}
ANTHROPIC_BASE_URL: ${{ secrets.LITELLM_BASE_URL }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: |
- claude -p \
- --model sonnet \
- --max-turns 10 \
- --allowedTools "Bash(gh issue *)" \
- "A new issue has been created in the ${{ github.repository }} repository.
+ PROMPT: |
+ A new issue has been created in the ${{ github.repository }} repository.
- Issue number: ${{ github.event.issue.number }}
+ Issue number: ${{ github.event.issue.number }}
- Lookup this issue with gh issue view ${{ github.event.issue.number }} --repo ${{ github.repository }}.
+ 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.
+ 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.
+ 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
+ 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:
+ 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 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]
+ 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."
+ 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 *)"
diff --git a/.github/workflows/check_duplicate_prs.yml b/.github/workflows/check_duplicate_prs.yml
index bdf54e93c87..5a5f1a89e69 100644
--- a/.github/workflows/check_duplicate_prs.yml
+++ b/.github/workflows/check_duplicate_prs.yml
@@ -24,32 +24,29 @@ jobs:
ANTHROPIC_API_KEY: ${{ secrets.LITELLM_VIRTUAL_KEY }}
ANTHROPIC_BASE_URL: ${{ secrets.LITELLM_BASE_URL }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: |
- claude -p \
- --model sonnet \
- --max-turns 10 \
- --allowedTools "Bash(gh pr *)" \
- "A new PR has been opened in the ${{ github.repository }} repository.
+ PROMPT: |
+ A new PR has been opened in the ${{ github.repository }} repository.
- PR number: ${{ github.event.pull_request.number }}
+ PR number: ${{ github.event.pull_request.number }}
- Lookup this PR with gh pr view ${{ github.event.pull_request.number }} --repo ${{ github.repository }}.
+ Lookup this PR with gh pr view ${{ github.event.pull_request.number }} --repo ${{ github.repository }}.
- Search through existing open PRs (excluding #${{ github.event.pull_request.number }}) to find potential duplicates.
+ Search through existing open PRs (excluding #${{ github.event.pull_request.number }}) to find potential duplicates.
- Use gh pr list --repo ${{ github.repository }} with relevant search terms from the new PR's title and description. Try multiple keyword combinations to search broadly. Check both open and recently closed PRs.
+ Use gh pr list --repo ${{ github.repository }} with relevant search terms from the new PR's title and description. Try multiple keyword combinations to search broadly. Check both open and recently closed PRs.
- Consider:
- 1. Similar titles or descriptions
- 2. Same bug fix or feature being implemented
- 3. Related functionality or components
- 4. Overlapping code changes (same files or areas)
+ Consider:
+ 1. Similar titles or descriptions
+ 2. Same bug fix or feature being implemented
+ 3. Related functionality or components
+ 4. Overlapping code changes (same files or areas)
- If you find potential duplicates, post a SINGLE comment on PR #${{ github.event.pull_request.number }} using gh pr comment ${{ github.event.pull_request.number }} --repo ${{ github.repository }} with this format:
+ If you find potential duplicates, post a SINGLE comment on PR #${{ github.event.pull_request.number }} using gh pr comment ${{ github.event.pull_request.number }} --repo ${{ github.repository }} with this format:
- _This comment was generated by an LLM and may be inaccurate._
+ _This comment was generated by an LLM and may be inaccurate._
- This PR might be a duplicate of existing PRs. Please check:
- - #[pr_number]: [brief description of similarity]
+ This PR might be a duplicate of existing PRs. Please check:
+ - #[pr_number]: [brief description of similarity]
- If you find NO duplicates, do NOT post any comment. Stay silent."
+ If you find NO duplicates, do NOT post any comment. Stay silent.
+ run: claude -p "$PROMPT" --model sonnet --max-turns 10 --allowedTools "Bash(gh pr *)"