refactor(internal/repometadata): use library to generate metadata#4068
Open
JoeWang1127 wants to merge 1 commit intomainfrom
Open
refactor(internal/repometadata): use library to generate metadata#4068JoeWang1127 wants to merge 1 commit intomainfrom
JoeWang1127 wants to merge 1 commit intomainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4068 +/- ##
==========================================
- Coverage 81.93% 81.92% -0.01%
==========================================
Files 78 78
Lines 6516 6513 -3
==========================================
- Hits 5339 5336 -3
Misses 832 832
Partials 345 345 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Code Review
This pull request is a good refactoring that simplifies the metadata generation logic. By removing the intermediate LibraryInfo struct and passing the config.Library struct directly, the code becomes cleaner and more maintainable. The change to initialize RepoMetadata using a single, alphabetically sorted struct literal in FromAPI also significantly improves readability. This is a solid preparatory change that I approve.
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.
Refactor library struct as one of the inputs to generate metadata from API.
In Go clients, some metadata, e.g., documentation url and distribution name, requires Go specific configuration from the library.
This is a preparation step for Go metadata generation.
For #3617