Skip to content

πŸš€ The fast, Pythonic way to build MCP servers and clients.

Simplify action setup and add github tools (#1419)

Jeremiah Lowin15cffa1016a5
diff --git a/.github/workflows/marvin.yml b/.github/workflows/marvin.yml
index 326ba3e63..a491ab1d6 100644
--- a/.github/workflows/marvin.yml
+++ b/.github/workflows/marvin.yml
@@ -13,6 +13,7 @@ permissions:
issues: write
pull-requests: write
discussions: write
+ actions: read
id-token: write
jobs:
@@ -21,15 +22,9 @@ jobs:
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '/marvin')) ||
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '/marvin')) ||
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '/marvin')) ||
- (github.event_name == 'issues' && (contains(github.event.issue.body, '/marvin') || contains(github.event.issue.title, '/marvin'))) ||
- (github.event_name == 'discussion' && (contains(github.event.discussion.body, '/marvin') || contains(github.event.discussion.title, '/marvin'))) ||
+ (github.event_name == 'issues' && contains(github.event.issue.body, '/marvin')) ||
+ (github.event_name == 'discussion' && contains(github.event.discussion.body, '/marvin')) ||
(github.event_name == 'discussion_comment' && contains(github.event.comment.body, '/marvin')) ||
- (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@Marvin Context Protocol')) ||
- (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@Marvin Context Protocol')) ||
- (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@Marvin Context Protocol')) ||
- (github.event_name == 'issues' && (contains(github.event.issue.body, '@Marvin Context Protocol') || contains(github.event.issue.title, '@Marvin Context Protocol'))) ||
- (github.event_name == 'discussion' && (contains(github.event.discussion.body, '@Marvin Context Protocol') || contains(github.event.discussion.title, '@Marvin Context Protocol'))) ||
- (github.event_name == 'discussion_comment' && contains(github.event.comment.body, '@Marvin Context Protocol')) ||
(github.event_name == 'issues' && github.event.action == 'assigned' && github.event.assignee.login == 'Marvin Context Protocol') ||
(github.event_name == 'issues' && github.event.action == 'labeled' && github.event.label.name == 'marvin')
runs-on: ubuntu-latest
@@ -43,16 +38,8 @@ jobs:
app-id: ${{ secrets.MARVIN_APP_ID }}
private-key: ${{ secrets.MARVIN_APP_PRIVATE_KEY }}
- # /marvin slash command
-
- - name: Marvin (/marvin)
- if: |
- (github.event_name == 'issue_comment' && contains(github.event.comment.body, '/marvin')) ||
- (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '/marvin')) ||
- (github.event_name == 'pull_request_review' && contains(github.event.review.body, '/marvin')) ||
- (github.event_name == 'issues' && (contains(github.event.issue.body, '/marvin') || contains(github.event.issue.title, '/marvin'))) ||
- (github.event_name == 'discussion' && (contains(github.event.discussion.body, '/marvin') || contains(github.event.discussion.title, '/marvin'))) ||
- (github.event_name == 'discussion_comment' && contains(github.event.comment.body, '/marvin'))
+ # Marvin Assistant
+ - name: Marvin
uses: anthropics/claude-code-action@beta
with:
github_token: ${{ steps.marvin-token.outputs.token }}
@@ -60,32 +47,6 @@ jobs:
mode: tag
trigger_phrase: "/marvin"
allowed_bots: "*"
-
- # @Marvin Context Protocol mention
- - name: Marvin (@Marvin Context Protocol)
- if: |
- (github.event_name == 'issue_comment' && contains(github.event.comment.body, '@Marvin Context Protocol')) ||
- (github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@Marvin Context Protocol')) ||
- (github.event_name == 'pull_request_review' && contains(github.event.review.body, '@Marvin Context Protocol')) ||
- (github.event_name == 'issues' && (contains(github.event.issue.body, '@Marvin Context Protocol') || contains(github.event.issue.title, '@Marvin Context Protocol'))) ||
- (github.event_name == 'discussion' && (contains(github.event.discussion.body, '@Marvin Context Protocol') || contains(github.event.discussion.title, '@Marvin Context Protocol'))) ||
- (github.event_name == 'discussion_comment' && contains(github.event.comment.body, '@Marvin Context Protocol'))
- uses: anthropics/claude-code-action@beta
- with:
- github_token: ${{ steps.marvin-token.outputs.token }}
- anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
- mode: tag
- trigger_phrase: "@Marvin Context Protocol"
-
- # Optional: assignment/label triggers
- - name: Marvin (assignee/label)
- if: |
- (github.event_name == 'issues' && github.event.action == 'assigned' && github.event.assignee.login == 'Marvin Context Protocol') ||
- (github.event_name == 'issues' && github.event.action == 'labeled' && github.event.label.name == 'marvin')
- uses: anthropics/claude-code-action@beta
- with:
- github_token: ${{ steps.marvin-token.outputs.token }}
- anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
- mode: tag
- assignee_trigger: "Marvin Context Protocol"
- label_trigger: "marvin"
+ allowed_tools: "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