mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-09 15:19:10 +02:00
Co-authored-by: Jeremiah Lowin <jlowin@users.noreply.github.com> Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
75 lines
3.3 KiB
YAML
75 lines
3.3 KiB
YAML
name: Marvin Context Protocol
|
|
|
|
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
|
|
actions: read
|
|
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')) ||
|
|
(github.event_name == 'discussion' && contains(github.event.discussion.body, '/marvin')) ||
|
|
(github.event_name == 'discussion_comment' && contains(github.event.comment.body, '/marvin')) ||
|
|
(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
|
|
|
|
# Set up Python environment
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
# Install UV package manager
|
|
- name: Install UV
|
|
uses: astral-sh/setup-uv@v5
|
|
with:
|
|
enable-cache: true
|
|
cache-dependency-glob: "uv.lock"
|
|
|
|
# Install project dependencies
|
|
- name: Install dependencies
|
|
run: uv sync --dev
|
|
|
|
# Install pre-commit hooks automatically
|
|
- name: Install pre-commit hooks
|
|
run: |
|
|
uv run pre-commit install
|
|
echo "✅ Pre-commit hooks installed"
|
|
|
|
- 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 }}
|
|
|
|
# Marvin Assistant
|
|
- name: Run Marvin
|
|
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"
|
|
allowed_bots: "*"
|
|
allowed_tools: "WebSearch,WebFetch,Bash(uv:*),Bash(pre-commit:*),Bash(pytest:*),Bash(ruff:*),Bash(pyright:*),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
|