From f80378238167d79ddc91d911fdfb2251518a46b3 Mon Sep 17 00:00:00 2001 From: Jeremiah Lowin <153965+jlowin@users.noreply.github.com> Date: Tue, 30 Sep 2025 16:38:51 -0400 Subject: [PATCH] Improve env vars for marvin (#1972) --- .github/workflows/marvin-dedupe-issues.yml | 7 +++-- .github/workflows/marvin-label-triage.yml | 31 +++------------------- .github/workflows/marvin.yml | 8 +++++- 3 files changed, 16 insertions(+), 30 deletions(-) diff --git a/.github/workflows/marvin-dedupe-issues.yml b/.github/workflows/marvin-dedupe-issues.yml index 84a88f063..3da916bf2 100644 --- a/.github/workflows/marvin-dedupe-issues.yml +++ b/.github/workflows/marvin-dedupe-issues.yml @@ -81,9 +81,12 @@ jobs: prompt: ${{ steps.dedupe-prompt.outputs.PROMPT }} anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY_FOR_CI }} claude_args: | - --model claude-sonnet-4-5-20250929 --allowedTools Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh api:*),Bash(gh issue comment:*),Task + --mcp-config /tmp/mcp-config/mcp-servers.json settings: | { - "GH_TOKEN": "${{ steps.marvin-token.outputs.token }}" + "model": "claude-sonnet-4-5-20250929", + "env": { + "GH_TOKEN": "${{ steps.marvin-token.outputs.token }}" + } } diff --git a/.github/workflows/marvin-label-triage.yml b/.github/workflows/marvin-label-triage.yml index 549bbe217..8d92702d4 100644 --- a/.github/workflows/marvin-label-triage.yml +++ b/.github/workflows/marvin-label-triage.yml @@ -24,7 +24,6 @@ jobs: contents: read issues: write pull-requests: write - id-token: write steps: - name: Checkout base repository @@ -124,30 +123,6 @@ jobs: PROMPT_END EOF - - name: Setup GitHub MCP Server - run: | - mkdir -p /tmp/mcp-config - cat > /tmp/mcp-config/mcp-servers.json << 'EOF' - { - "mcpServers": { - "github": { - "command": "docker", - "args": [ - "run", - "-i", - "--rm", - "-e", - "GITHUB_PERSONAL_ACCESS_TOKEN", - "ghcr.io/github/github-mcp-server:sha-7aced2b" - ], - "env": { - "GITHUB_PERSONAL_ACCESS_TOKEN": "${{ steps.marvin-token.outputs.token }}" - } - } - } - } - EOF - - name: Run Marvin for Issue Triage uses: anthropics/claude-code-action@v1 with: @@ -156,10 +131,12 @@ jobs: prompt: ${{ steps.triage-prompt.outputs.PROMPT }} anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY_FOR_CI }} claude_args: | - --model claude-sonnet-4-5-20250929 --allowedTools Bash(gh label list),mcp__github__get_issue,mcp__github__get_issue_comments,mcp__github__update_issue,mcp__github__get_pull_request_files --mcp-config /tmp/mcp-config/mcp-servers.json settings: | { - "GH_TOKEN": "${{ steps.marvin-token.outputs.token }}" + "model": "claude-sonnet-4-5-20250929", + "env": { + "GH_TOKEN": "${{ steps.marvin-token.outputs.token }}" + } } diff --git a/.github/workflows/marvin.yml b/.github/workflows/marvin.yml index 8b16e5928..165edb7ad 100644 --- a/.github/workflows/marvin.yml +++ b/.github/workflows/marvin.yml @@ -66,7 +66,13 @@ jobs: trigger_phrase: "/marvin" allowed_bots: "*" claude_args: | - --model claude-sonnet-4-5-20250929 --allowedTools WebSearch,WebFetch,Bash(uv:*),Bash(pre-commit:*),Bash(pytest:*),Bash(ruff:*),Bash(ty:*),Bash(git:*),Bash(gh:*),mcp__github__add_issue_comment,mcp__github__create_issue,mcp__github__get_issue,mcp__github__list_issues,mcp__github__search_issues,mcp__github__update_issue,mcp__github__update_issue_comment,mcp__github__create_pull_request,mcp__github__get_pull_request,mcp__github__get_pull_request_comments,mcp__github__get_pull_request_files,mcp__github__get_pull_request_reviews,mcp__github__get_pull_request_status,mcp__github__list_pull_requests,mcp__github__update_pull_request,mcp__github__update_pull_request_branch,mcp__github__update_pull_request_comment,mcp__github__merge_pull_request additional_permissions: | actions: read + settings: | + { + "model": "claude-sonnet-4-5-20250929", + "env": { + "GH_TOKEN": "${{ steps.marvin-token.outputs.token }}" + } + }