mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-09 15:19:10 +02:00
Simplify action setup and add github tools (#1419)
This commit is contained in:
parent
4889bc1aba
commit
15cffa1016
1 changed files with 8 additions and 47 deletions
55
.github/workflows/marvin.yml
vendored
55
.github/workflows/marvin.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue