feat: API sidebar sync automation#367
Merged
steve-calvert-glean merged 4 commits intomainfrom Feb 27, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Adds scripts/sync-api-sidebar.mjs which validates and auto-fixes sidebars.ts against generated .api.mdx files using AST manipulation (jscodeshift) and prettier for formatting. - `pnpm sidebar:check` — exits 1 with a list of missing entries (CI gate) - `pnpm sidebar:fix` — inserts missing entries via AST, then runs prettier Hooks sidebar:fix into all three openapi:regenerate:* scripts so that sidebar updates are atomic with API page regeneration. Adds a sidebar:check step to ci.yml before the build to prevent gaps from landing silently on main. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Runs pnpm sidebar:fix to insert 5 entries that were present as generated .api.mdx files but missing from sidebars.ts: - api/client-api/authentication/checkdatasourceauth - api/client-api/governance/createfindingsexport - api/client-api/governance/deletefindingsexport - api/client-api/governance/downloadfindingsexport - api/client-api/governance/listfindingsexports Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
e6df160 to
3948813
Compare
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
chris-freeman-glean
approved these changes
Feb 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scripts/sync-api-sidebar.mjs— AST-based (jscodeshift) script that validates and auto-fixessidebars.tsagainst generated.api.mdxfiles, then runs prettier on the resultpnpm sidebar:check(CI gate, exits 1 if any.api.mdxis missing from the sidebar) andpnpm sidebar:fix(inserts missing entries)sidebar:fixinto all threeopenapi:regenerate:*scripts so sidebar updates are atomic with API page regenerationCheck API sidebar completenessstep toci.ymlbefore the build, preventing gaps from landing silently on mainauthentication/checkdatasourceauth,governance/createfindingsexport,governance/deletefindingsexport,governance/downloadfindingsexport,governance/listfindingsexportsTest plan
pnpm sidebar:checkexits 0 on this branch (sidebar is now complete)pnpm sidebar:checkexits 1 if a sidebar entry is manually removedpnpm sidebar:fixre-inserts the entry with correct formattingCheck API sidebar completenessstep should be green🤖 Generated with Claude Code