-
Notifications
You must be signed in to change notification settings - Fork 1k
Migrate to mintlify #925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Migrate to mintlify #925
Conversation
🟡 Heimdall Review Status
|
|
@manifoldfrs is attempting to deploy a commit to the Coinbase Team on Vercel. A member of the Team first needs to authorize it. |
3ae75ef to
45c1a35
Compare
d4ac960 to
96f08fc
Compare
| - Changes to `typescript/packages/*/src/` affect SDK references and quickstart guides | ||
| - Changes to `python/x402/src/` affect Python SDK references | ||
| - Changes to `go/` affect Go SDK references |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally we could exclude legacy packages here:
- typescript/packages/legacy/*
- go/legacy
- python/legacy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, but I did happen to update the typescript legacy package to fix a bug in this PR https://github.com/coinbase/x402/pull/967/changes#diff-3997cdf0b0daf1a99c50cd1b237f6c702dcbbc7416645928f76068d6a795fac1, perhaps we leave it for now and we exclude later?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes but gitdocs only document v2, not legacy as far as I know
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah yes you're right we decided to leave legacy docs out, good catch I'll update
| ## Code-to-Doc Mapping | ||
| - Changes to `typescript/packages/core/src/` affect Core Concepts docs | ||
| - Changes to `typescript/packages/*/src/` affect SDK references and quickstart guides | ||
| - Changes to `python/x402/src/` affect Python SDK references |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
once v2 is live, this should be python/x402/ only
| | `typescript/packages/*/src/*.ts` API changes | SDK reference, quickstart guides | | ||
| | `python/x402/src/*.py` API changes | Python SDK reference | | ||
| | `go/*.go` API changes | Go SDK reference | | ||
| | `java/src/**/*.java` API changes | Java SDK reference | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see above
|
Looks great to me @manifoldfrs! Just a few minor suggestions/comments above |
84baaba to
032bbc5
Compare
|
Will incorporate python v2 changes once this PR merges: #841 |
Description
Migrates x402 documentation from GitBook to Mintlify, with automated documentation updates when SDK code changes.
Automated Documentation Updates:
mainAGENTS.mdfileFiles
.github/workflows/update-docs.ymldocs/AGENTS.mddocs/docs.jsonAutomation Workflow
When code is pushed to main, the GitHub Actions workflow evaluates whether to trigger the Mintlify agent. The workflow first applies a
paths-ignorefilter that skips entirely if only documentation files or test files changed. If non-excluded files are present, the workflow uses GitHub's Compare API to get a reliable list of changed files between the before/after commit SHAs. This approach was specifically chosen because the standardpayload.commits[].added/modifiedmethod fails for squash merges, but the Compare API works correctly for all merge types (merge commits, squash, and rebase).The workflow constructs a detailed prompt containing the list of changed files, the commit message, and a set of critical rules that constrain the agent's behavior. These rules explicitly instruct the agent to only update documentation directly related to the specific code changes, and to skip creating a PR if the changes are trivial (comment removal, formatting, optional parameters, etc.). The agent also reads
docs/AGENTS.mdwhich contains a code-to-doc mapping table. For example, changes totypescript/packages/core/src/should update Core Concepts docs, while changes topython/x402/src/should update Python SDK references.The Mintlify agent analyzes the code changes against the existing documentation. If it determines updates are needed, it creates a new branch and opens a pull request with the documentation changes. If the changes are trivial or don't affect user-facing documentation, the agent reports "No documentation updates needed" and exits without creating a PR. All PRs are created as non-draft and ready for human review, the agent never commits directly to main.
The two-layer filtering (paths-ignore at trigger level, regex filtering in script, plus agent-level rules in
AGENTS.md) creates a system that's sensitive enough to catch impactful changes but not so noisy that it creates PRs for every commit. Testing confirmed this balance: the agent correctly skipped trivial changes like comment removal and optional parameter additions, while correctly creating a PR when a default timeout behavior was added to HTTPFacilitatorClient (see manifoldfrs#15).Tests
Tested with 5 scenarios on fork (manifoldfrs/x402-fh):
Configurations Required
MINTLIFY_API_KEYMINTLIFY_PROJECT_IDPrerequisites
coinbase/x402Documentation
Checklist
docs.json.mdextensions)Breaking Changes
None. This is a documentation infrastructure change only.
Related