Skip to content

🐛 fix: strip .mdx as well as .md when building sync-sibling-docs route map - #392

Merged
hivecommons-hive[bot] merged 1 commit into
mainfrom
fix/sync-sibling-docs-mdx-route
Oct 19, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
mainfrom
fix/sync-sibling-docs-mdx-route

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Addresses the folded scanner finding on #355: rewriteLinks in scripts/sync-sibling-docs.ts built the synced-route map with s.target.replace(/\.md$/i, ""), so a SyncedFile whose target ends in .mdx produced a route like /docs/<project>/<page>.mdx instead of /docs/<project>/<page>.

  • Match /\.mdx?$/i instead.
  • Add a rewriteLinks test with an .mdx target.
  • Changelog fragment.

Refs #355.

…e map

rewriteLinks built the synced-route map with target.replace(/\.md$/i, ''),
so a page synced with an .mdx target produced /docs/<project>/<page>.mdx.
Match .mdx? and add a rewriteLinks test for an .mdx target.

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@kubestellar-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign clubanderson for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@netlify

netlify Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for hivecommons-docs ready!

Name Link
🔨 Latest commit a912071
🔍 Latest deploy log https://app.netlify.com/projects/hivecommons-docs/deploys/6ad63c90b66b84a46d3d417f
😎 Deploy Preview https://deploy-preview-392--hivecommons-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

@clubanderson is auto-promoted for contributor-lane merging on this PR: the last 5 merged PRs by this author in this repository have no revert or sentinel-alert evidence. CI, reviewer verdict, diff fences, soak, holds and branch protection still apply.

@hivecommons-hive hivecommons-hive Bot added author/human A person pushed this PR themselves dco All commits are DCO signed-off role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed dco-signoff: yes labels Oct 19, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Read scripts/sync-sibling-docs.ts at a912071. Looks correct to me.

  • The route map at scripts/sync-sibling-docs.ts:424-427 is keyed on s.source and the value is built from s.target; /\.mdx?$/i now strips either extension, matching Docusaurus' extension-less routes for both .md and .mdx pages. The matcher side (resolveSyncedRoute, line 436) is unchanged and unaffected.
  • Worth knowing for whoever merges: every target in the current PROJECTS table (lines 76-136) ends in .md — the .mdx sources are mapped to .md targets — so this is latent hardening rather than a live bug on today's config. The new test pins the behaviour for when an .mdx target is added.
  • Changelog fragment name/category follows the fixed-<issue>-<slug>.md convention.

No findings.

— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@clubanderson

Copy link
Copy Markdown
Member Author

/lgtm

@clubanderson

Copy link
Copy Markdown
Member Author

/approve

@kubestellar-prow

Copy link
Copy Markdown

@clubanderson: you cannot LGTM your own PR.

Details

In response to this:

/lgtm

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@hivecommons-hive
hivecommons-hive Bot merged commit cd655af into main Oct 19, 2026
10 of 11 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the fix/sync-sibling-docs-mdx-route branch October 19, 2026 16:21
@hivecommons-hive

Copy link
Copy Markdown
Contributor
Evidence bundle `#392a912071` sha256:0bddf5306353c684b6dfc866d879ced4364202d666fe67090647545a5a87deae — download from the dashboard or `hivectl review evidence #392`.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

merged by Hive trusted-author auto-merge: author @clubanderson holds role owner and GitHub permission admin on repo; CI green at a912071.

@hivecommons-hive hivecommons-hive Bot removed role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/human A person pushed this PR themselves dco All commits are DCO signed-off size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant