Fix prompt_file input and bot attribution (#1960)

This commit is contained in:
Jeremiah Lowin 2025-09-29 20:42:24 -04:00 committed by GitHub
commit 02b6a76d11
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 14 additions and 8 deletions

View file

@ -30,10 +30,11 @@ jobs:
app-id: ${{ secrets.MARVIN_APP_ID }}
private-key: ${{ secrets.MARVIN_APP_PRIVATE_KEY }}
- name: Create dedupe prompt
- name: Set dedupe prompt
id: dedupe-prompt
run: |
mkdir -p /tmp/claude-prompts
cat > /tmp/claude-prompts/dedupe-prompt.txt << 'EOF'
cat >> $GITHUB_OUTPUT << 'EOF'
PROMPT<<PROMPT_END
Find up to 3 likely duplicate issues for GitHub issue ${{ github.repository }}/issues/${{ github.event.issue.number || inputs.issue_number }}.
Follow these steps precisely:
@ -69,13 +70,15 @@ jobs:
- To prevent auto-closure, add a comment or 👎 this comment
---
PROMPT_END
EOF
- name: Run Marvin dedupe command
uses: anthropics/claude-code-action@v1
with:
github_token: ${{ steps.marvin-token.outputs.token }}
prompt_file: /tmp/claude-prompts/dedupe-prompt.txt
bot_name: "Marvin Context Protocol"
prompt: ${{ steps.dedupe-prompt.outputs.PROMPT }}
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY_FOR_CI }}
claude_args: |
--allowedTools Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh api:*),Bash(gh issue comment:*),Task

View file

@ -40,10 +40,11 @@ jobs:
app-id: ${{ secrets.MARVIN_APP_ID }}
private-key: ${{ secrets.MARVIN_APP_PRIVATE_KEY }}
- name: Create triage prompt
- name: Set triage prompt
id: triage-prompt
run: |
mkdir -p /tmp/claude-prompts
cat > /tmp/claude-prompts/triage-prompt.txt << 'EOF'
cat >> $GITHUB_OUTPUT << 'EOF'
PROMPT<<PROMPT_END
You're an issue triage assistant for FastMCP, a Python framework for building Model Context Protocol servers and clients. Your task is to analyze issues/PRs and apply appropriate labels.
IMPORTANT: Your ONLY action should be to apply labels using mcp__github__update_issue. DO NOT post any comments.
@ -120,6 +121,7 @@ jobs:
4. Apply selected labels:
Use mcp__github__update_issue to apply your selected labels
DO NOT post any comments
PROMPT_END
EOF
- name: Setup GitHub MCP Server
@ -150,7 +152,8 @@ jobs:
uses: anthropics/claude-code-action@v1
with:
github_token: ${{ steps.marvin-token.outputs.token }}
prompt_file: /tmp/claude-prompts/triage-prompt.txt
bot_name: "Marvin Context Protocol"
prompt: ${{ steps.triage-prompt.outputs.PROMPT }}
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY_FOR_CI }}
claude_args: |
--allowedTools Bash(gh label list),mcp__github__get_issue,mcp__github__get_issue_comments,mcp__github__update_issue,mcp__github__get_pull_request_files