From ea81cfd08bf11252623a62b84e71c41f186eddd5 Mon Sep 17 00:00:00 2001 From: William Easton Date: Wed, 1 Oct 2025 12:21:47 -0500 Subject: [PATCH 1/3] Add a new martian --- .github/workflows/marvin-issue-triage.yml | 138 ++++++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100644 .github/workflows/marvin-issue-triage.yml diff --git a/.github/workflows/marvin-issue-triage.yml b/.github/workflows/marvin-issue-triage.yml new file mode 100644 index 000000000..4a3da4de3 --- /dev/null +++ b/.github/workflows/marvin-issue-triage.yml @@ -0,0 +1,138 @@ +name: The Martian Issue Triage + +on: + issues: + types: [opened] + workflow_dispatch: + inputs: + issue_number: + description: "Issue to triage" + required: true + type: string + +concurrency: + group: triage-issue-${{ github.event.issue.number || inputs.issue_number }} + cancel-in-progress: true + +jobs: + marvin-issue-triage: + runs-on: ubuntu-latest + timeout-minutes: 10 + permissions: + contents: read + issues: write + pull-requests: read + id-token: write + + steps: + - name: Checkout base repository + uses: actions/checkout@v5 + with: + repository: ${{ github.repository }} + ref: ${{ github.event.repository.default_branch }} + + - name: Generate Marvin App token + id: marvin-token + uses: actions/create-github-app-token@v2 + with: + app-id: ${{ secrets.MARVIN_APP_ID }} + private-key: ${{ secrets.MARVIN_APP_PRIVATE_KEY }} + + - name: Set triage prompt + id: triage-prompt + run: | + cat >> $GITHUB_OUTPUT << 'EOF' + PROMPT< /tmp/mcp-config/mcp-servers.json << 'EOF' + { + "mcpServers": { + "repository-summary": { + "type": "http", + "url": "https://agents-md-generator.fastmcp.app/mcp" + }, + "code-search": { + "type": "http", + "url": "https://github-code-search.fastmcp.app/mcp" + }, + "github-research": { + "command": "uvx", + "args": [ + "github-research-mcp" + ], + "env": { + "DISABLE_SUMMARIES": true, + "GITHUB_PERSONAL_ACCESS_TOKEN": "${{ steps.marvin-token.outputs.token }}" + } + } + } + } + EOF + + - name: Run Marvin for Issue Triage + uses: anthropics/claude-code-action@v1 + with: + github_token: ${{ steps.marvin-token.outputs.token }} + bot_name: "Marvin Context Protocol" + prompt: ${{ steps.triage-prompt.outputs.PROMPT }} + anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY_FOR_CI }} + claude_args: | + --model claude-sonnet-4-5-20250929 + --allowedTools WebSearch,WebFetch,mcp__repository-summary,mcp__code-search,mcp__github-research + --mcp-config /tmp/mcp-config/mcp-servers.json + settings: | + { + "GH_TOKEN": "${{ steps.marvin-token.outputs.token }}" + } From ccc5dc8194bf088fe69c12e54ef4833f20b11a0d Mon Sep 17 00:00:00 2001 From: William Easton Date: Wed, 1 Oct 2025 12:25:52 -0500 Subject: [PATCH 2/3] Limit the martian --- .github/workflows/marvin-issue-triage.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/marvin-issue-triage.yml b/.github/workflows/marvin-issue-triage.yml index 4a3da4de3..d1fa4e175 100644 --- a/.github/workflows/marvin-issue-triage.yml +++ b/.github/workflows/marvin-issue-triage.yml @@ -16,6 +16,7 @@ concurrency: jobs: marvin-issue-triage: + if: github.actor == 'strawgate' runs-on: ubuntu-latest timeout-minutes: 10 permissions: From 22e5a167147855ec88206a278ed833f2dacbe74a Mon Sep 17 00:00:00 2001 From: William Easton Date: Wed, 1 Oct 2025 12:29:07 -0500 Subject: [PATCH 3/3] Fix marvin label triage for non-contributors --- .github/workflows/marvin-label-triage.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/marvin-label-triage.yml b/.github/workflows/marvin-label-triage.yml index 8d92702d4..64d91eada 100644 --- a/.github/workflows/marvin-label-triage.yml +++ b/.github/workflows/marvin-label-triage.yml @@ -1,5 +1,6 @@ name: Marvin Label Triage -description: Automatically triage GitHub issues and PRs using Marvin +# Automatically triage GitHub issues and PRs using Marvin + on: issues: types: [opened] @@ -17,7 +18,7 @@ concurrency: cancel-in-progress: false jobs: - triage-issue: + label-issue-or-pr: runs-on: ubuntu-latest timeout-minutes: 10 permissions: @@ -123,13 +124,14 @@ jobs: PROMPT_END EOF - - name: Run Marvin for Issue Triage + - name: Run Marvin for Issue Triage uses: anthropics/claude-code-action@v1 with: github_token: ${{ steps.marvin-token.outputs.token }} bot_name: "Marvin Context Protocol" prompt: ${{ steps.triage-prompt.outputs.PROMPT }} anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY_FOR_CI }} + allowed_non_write_users: "*" # Required for issue triage workflow, if users without repo write access create issues 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 --mcp-config /tmp/mcp-config/mcp-servers.json