Skip to content

fix(preview): regen reference MDX for fork docs2mdx PRs - #657

Open
alexeagle wants to merge 1 commit into
mainfrom
preview-fork-docs2mdx-regen
Open

fix(preview): regen reference MDX for fork docs2mdx PRs#657
alexeagle wants to merge 1 commit into
mainfrom
preview-fork-docs2mdx-regen

Conversation

@alexeagle

Copy link
Copy Markdown
Collaborator

Summary

Fixes stale reference docs in Mintlify previews for fork PRs that change scripts/docs/docs2mdx.py (e.g. bazelbuild/bazel#30708).

Root cause: Preview sets trust_upstream_code: false for fork PRs, which skipped gen_mdx_reference_docs but still rsync'd pre-built reference MDX from upstream/docs/ — so converter fixes never appeared in preview.

Fix: Split-trust regen for fork PRs changing scripts/docs/**:

  1. Build reference HTML inputs from the trusted PR base commit (Bazel on base)
  2. Run the PR's docs2mdx.py via Python (no Bazel on fork BUILD files)
  3. Extract fresh MDX over the rsync'd docs (same as trusted path)

Limitations

Fork PRs changing docgen inputs still cannot rebuild reference HTML from fork code.

Test plan

Fork PR previews skipped gen_mdx_reference_docs (trust_upstream_code:
false) and synced stale pre-built reference MDX from upstream/docs/.

For fork PRs changing scripts/docs/**, build HTML inputs from the
trusted PR base commit, then run the PR's docs2mdx.py via Python to
produce fresh reference MDX for Mintlify preview.
@mintlify

mintlify Bot commented Aug 13, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
bazel 🟢 Ready View Preview Aug 13, 2026, 7:04 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@alan707

alan707 commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

@alexeagle can we create a test PR to show this is working as expected?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants