mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-27 15:51:33 +02:00
90 lines
5.4 KiB
YAML
90 lines
5.4 KiB
YAML
name: Marvin Assistant
|
|
|
|
on:
|
|
issue_comment: { types: [created] }
|
|
pull_request_review_comment: { types: [created] }
|
|
pull_request_review: { types: [submitted] }
|
|
issues: { types: [opened, edited, assigned, labeled] }
|
|
discussion: { types: [created, edited, labeled] }
|
|
discussion_comment: { types: [created] }
|
|
|
|
permissions:
|
|
contents: write
|
|
issues: write
|
|
pull-requests: write
|
|
discussions: write
|
|
id-token: write
|
|
|
|
jobs:
|
|
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')) ||
|
|
(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
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Get Marvin app token
|
|
id: mtoken
|
|
uses: tibdex/github-app-token@v2
|
|
with:
|
|
app_id: ${{ secrets.MARVIN_APP_ID }}
|
|
private_key: ${{ secrets.MARVIN_APP_PRIVATE_KEY }}
|
|
|
|
# /marvin slash command
|
|
- name: Claude Code (/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'))
|
|
uses: anthropics/claude-code-action@v1
|
|
with:
|
|
github-token: ${{ steps.mtoken.outputs.token }}
|
|
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
mode: tag
|
|
trigger_phrase: "/marvin"
|
|
allowed_bots: "*"
|
|
|
|
# @Marvin Context Protocol mention
|
|
- name: Claude Code (@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@v1
|
|
with:
|
|
github-token: ${{ steps.mtoken.outputs.token }}
|
|
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
mode: tag
|
|
trigger_phrase: "@Marvin Context Protocol"
|
|
|
|
# Optional: assignment/label triggers
|
|
- name: Claude Code (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@v1
|
|
with:
|
|
github-token: ${{ steps.mtoken.outputs.token }}
|
|
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
|
mode: tag
|
|
assignee_trigger: "Marvin Context Protocol"
|
|
label_trigger: "marvin"
|