Skip to content

Feat/gen toc#477

Open
VelmiraS wants to merge 6 commits into
gardener:feat/gen-tocfrom
VelmiraS:feat/gen-toc
Open

Feat/gen toc#477
VelmiraS wants to merge 6 commits into
gardener:feat/gen-tocfrom
VelmiraS:feat/gen-toc

Conversation

@VelmiraS

@VelmiraS VelmiraS commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

Adds a new gen-toc subcommand that generates a navigation YAML file from a Docforge manifest. The generated structure reflects the dir / file / fileTree hierarchy defined in the manifest and can be used as input for SAP portal (toc.yaml)

Also fixes a non-deterministic ordering bug in Tree() output caused by Go map iteration randomness — without this fix, repeated runs of gen-toc on the same manifest could produce different orderings.

Which issue(s) this PR fixes:
Fixes ##471

Special notes for your reviewer:

The gen-toc subcommand does not download files — it only resolves the manifest and derives the navigation structure. The --strip-root flag removes the top-level directory prefix from all paths in the output.

The ordering fix in pkg/registry/repositoryhost/github_http_cache.go (sort.Strings(out) in Tree()) is a minimal, safe change — GitHub API already returns entries alphabetically, so the sort produces the same result as preserving API order.

Release note:

Added gen-toc subcommand to generate a navigation YAML from a Docforge manifest without downloading any files. Supports VitePress, MkDocs, SAP portal (toc.yaml), and other navigation formats. Use --strip-root to remove the top-level directory prefix from all paths.

RadaBDimitrova and others added 6 commits June 17, 2026 13:54
feat: make GitHub host configurable via github-oauth-env-map
Go map iteration is randomized, causing gen-toc to produce different
file ordering on each run. Sort the result slice before returning.
@VelmiraS VelmiraS requested a review from klocke-io July 9, 2026 05:32
@gardener-prow gardener-prow Bot added the do-not-merge/contains-merge-commits Indicates a PR which contains merge commits. label Jul 9, 2026
@gardener-prow

gardener-prow Bot commented Jul 9, 2026

Copy link
Copy Markdown

Adding label do-not-merge/contains-merge-commits because PR contains merge commits, which are not allowed in this repository.
Use git rebase to reapply your commits on top of the target branch. Detailed instructions for doing so can be found here.

Details

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.

@gardener-prow gardener-prow Bot added the do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. label Jul 9, 2026
@gardener-prow

gardener-prow Bot commented Jul 9, 2026

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 radabdimitrova 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

@gardener-prow gardener-prow Bot added cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. do-not-merge/contains-merge-commits Indicates a PR which contains merge commits. do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants