mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-23 05:54:19 +02:00
Revert to long-lived PR approach for auto-generated docs/schema (#3272)
🤖 Generated with Claude Code https://claude.ai/code/session_01LUn4EnV6nZS5UgFz9wtyB3 Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
parent
83d6254757
commit
d85cfb84e1
3 changed files with 50 additions and 39 deletions
43
.github/workflows/update-config-schema.yml
vendored
43
.github/workflows/update-config-schema.yml
vendored
|
|
@ -1,10 +1,10 @@
|
|||
name: Update MCPServerConfig Schema
|
||||
|
||||
# Regenerates config schema on PRs and commits it back to the branch,
|
||||
# so the PR is self-contained and main is correct after merge.
|
||||
# Regenerates config schema on pushes to main and opens a long-lived PR
|
||||
# with the changes, so contributor PRs stay clean.
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches: ["main"]
|
||||
paths:
|
||||
- "src/fastmcp/utilities/mcp_server_config/**"
|
||||
|
|
@ -13,14 +13,12 @@ on:
|
|||
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
update-config-schema:
|
||||
timeout-minutes: 5
|
||||
runs-on: ubuntu-latest
|
||||
if: >-
|
||||
github.event_name == 'workflow_dispatch' ||
|
||||
github.event.pull_request.head.repo.full_name == github.repository
|
||||
|
||||
steps:
|
||||
- name: Generate Marvin App token
|
||||
|
|
@ -32,7 +30,6 @@ jobs:
|
|||
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
ref: ${{ github.head_ref || github.ref }}
|
||||
token: ${{ steps.marvin-token.outputs.token }}
|
||||
|
||||
- name: Install uv
|
||||
|
|
@ -53,15 +50,23 @@ jobs:
|
|||
generate_schema('src/fastmcp/utilities/mcp_server_config/v1/schema.json')
|
||||
"
|
||||
|
||||
- name: Commit and push if changed
|
||||
run: |
|
||||
git config user.name "marvin-context-protocol[bot]"
|
||||
git config user.email "225465937+marvin-context-protocol[bot]@users.noreply.github.com"
|
||||
git add docs/public/schemas/ src/fastmcp/utilities/mcp_server_config/v1/schema.json
|
||||
if git diff --cached --quiet; then
|
||||
echo "Config schema is up to date"
|
||||
else
|
||||
git commit -m "chore: Update fastmcp.json schema"
|
||||
git push
|
||||
echo "Config schema updated and pushed"
|
||||
fi
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v8
|
||||
with:
|
||||
token: ${{ steps.marvin-token.outputs.token }}
|
||||
commit-message: "chore: Update fastmcp.json schema"
|
||||
title: "chore: Update fastmcp.json schema"
|
||||
body: |
|
||||
This PR updates the fastmcp.json schema files to match the current source code.
|
||||
|
||||
The schema is automatically generated from `src/fastmcp/utilities/mcp_server_config/` to ensure consistency.
|
||||
|
||||
**Note:** This PR is fully automated and will update itself with any subsequent changes to the schema, or close automatically if the schema becomes up-to-date through other means.
|
||||
|
||||
🤖 Generated by Marvin
|
||||
branch: marvin/update-config-schema
|
||||
labels: |
|
||||
ignore in release notes
|
||||
delete-branch: true
|
||||
author: "marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>"
|
||||
committer: "marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>"
|
||||
|
|
|
|||
43
.github/workflows/update-sdk-docs.yml
vendored
43
.github/workflows/update-sdk-docs.yml
vendored
|
|
@ -1,10 +1,10 @@
|
|||
name: Update SDK Documentation
|
||||
|
||||
# Regenerates SDK docs on PRs and commits them back to the branch,
|
||||
# so the PR is self-contained and main is correct after merge.
|
||||
# Regenerates SDK docs on pushes to main and opens a long-lived PR
|
||||
# with the changes, so contributor PRs stay clean.
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches: ["main"]
|
||||
paths:
|
||||
- "src/**"
|
||||
|
|
@ -13,14 +13,12 @@ on:
|
|||
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
update-sdk-docs:
|
||||
timeout-minutes: 5
|
||||
runs-on: ubuntu-latest
|
||||
if: >-
|
||||
github.event_name == 'workflow_dispatch' ||
|
||||
github.event.pull_request.head.repo.full_name == github.repository
|
||||
|
||||
steps:
|
||||
- name: Generate Marvin App token
|
||||
|
|
@ -32,7 +30,6 @@ jobs:
|
|||
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
ref: ${{ github.head_ref || github.ref }}
|
||||
token: ${{ steps.marvin-token.outputs.token }}
|
||||
|
||||
- name: Install uv
|
||||
|
|
@ -50,15 +47,23 @@ jobs:
|
|||
- name: Generate SDK documentation
|
||||
run: just api-ref-all
|
||||
|
||||
- name: Commit and push if changed
|
||||
run: |
|
||||
git config user.name "marvin-context-protocol[bot]"
|
||||
git config user.email "225465937+marvin-context-protocol[bot]@users.noreply.github.com"
|
||||
git add docs/python-sdk/
|
||||
if git diff --cached --quiet; then
|
||||
echo "SDK documentation is up to date"
|
||||
else
|
||||
git commit -m "chore: Update SDK documentation"
|
||||
git push
|
||||
echo "SDK documentation updated and pushed"
|
||||
fi
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v8
|
||||
with:
|
||||
token: ${{ steps.marvin-token.outputs.token }}
|
||||
commit-message: "chore: Update SDK documentation"
|
||||
title: "chore: Update SDK documentation"
|
||||
body: |
|
||||
This PR updates the auto-generated SDK documentation to reflect the latest source code changes.
|
||||
|
||||
📚 Documentation is automatically generated from the source code docstrings and type annotations.
|
||||
|
||||
**Note:** This PR is fully automated and will update itself with any subsequent changes to the SDK, or close automatically if the documentation becomes up-to-date through other means. Feel free to leave it open until you're ready to merge.
|
||||
|
||||
🤖 Generated by Marvin
|
||||
branch: marvin/update-sdk-docs
|
||||
labels: |
|
||||
ignore in release notes
|
||||
delete-branch: true
|
||||
author: "marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>"
|
||||
committer: "marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>"
|
||||
|
|
|
|||
|
|
@ -96,7 +96,8 @@ When modifying MCP functionality, changes typically need to be applied across al
|
|||
|
||||
- Uses Mintlify framework
|
||||
- Files must be in docs.json to be included
|
||||
- Do not manually modify `docs/python-sdk/**` — a bot automatically updates these files via commits added to PRs. Changes to these files in PR diffs are expected and should not be flagged during review.
|
||||
- Do not manually modify `docs/python-sdk/**` — these files are auto-generated from source code by a bot and maintained via a long-lived PR. Do not include changes to these files in contributor PRs.
|
||||
- Do not manually modify `docs/public/schemas/**` or `src/fastmcp/utilities/mcp_server_config/v1/schema.json` — these are auto-generated and maintained via a long-lived PR.
|
||||
- **Core Principle:** A feature doesn't exist unless it is documented!
|
||||
|
||||
### Documentation Guidelines
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue