chore(internal/godocfx): support individual package .repo-metadata.json#13859
Merged
hongalex merged 2 commits intogoogleapis:mainfrom Feb 23, 2026
Merged
chore(internal/godocfx): support individual package .repo-metadata.json#13859hongalex merged 2 commits intogoogleapis:mainfrom
hongalex merged 2 commits intogoogleapis:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request successfully refactors the godocfx tool to support individual .repo-metadata.json files, moving away from a single, centralized metadata file. The new implementation correctly searches for metadata files upwards from the package directory and includes a fallback mechanism. The test suite and golden files have been thoroughly updated to reflect these changes, ensuring the new metadata resolution logic works as expected and improves symbol linking in the generated documentation. The changes are well-implemented and align with the stated objectives of the pull request.
shollyman
reviewed
Feb 18, 2026
internal/godocfx/testdata/golden/cloud.google.com/go/storage@v1.33.0/index.yml
Show resolved
Hide resolved
shollyman
approved these changes
Feb 23, 2026
hongalex
added a commit
that referenced
this pull request
Feb 24, 2026
…3887) #13859 was the precursor to this, but only searched from package -> root module, and thus couldn't find `.repo-metadata.json` files for packages like [Translate](https://github.com/googleapis/google-cloud-go/blob/main/translate/translate.go) The appropriate file lives at `translate/apiv3/.repo-metadata.json`, so we need to walk through the subdirectories as well. There's one remaining issue that the zipped version of translate (v1.27.1) doesn't actually contain this new json file, so simply running `./godocfx cloud.google.com/go/translate` will fail, but `./godocfx cloud.google.com/go/translate@main` (at head) will succeed. This should be fine since publish_docs should only be done on new releases, but if this assumption is wrong, we can update this as a fallback.
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.
The single internal/.repo-metadata-full.json file was removed in
favor of individual .repo-metadata.json files located within package
directories.
godocfxwas dependent on fetching this.This PR updates the metadata resolution to:
.repo-metadata.jsonfile.Also updated test goldens to reflect metadata resolution changes and
improved symbol linking.
Fixes: b/462186715