Skip to content

refactor(internal/repometadata): use library to generate metadata#4068

Open
JoeWang1127 wants to merge 1 commit intomainfrom
chore/refactor-from-api
Open

refactor(internal/repometadata): use library to generate metadata#4068
JoeWang1127 wants to merge 1 commit intomainfrom
chore/refactor-from-api

Conversation

@JoeWang1127
Copy link
Contributor

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

@JoeWang1127 JoeWang1127 changed the title chore: use library to generate metadata refactor(internal/repometadata): use library to generate metadata Feb 14, 2026
@codecov
Copy link

codecov bot commented Feb 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.92%. Comparing base (d54fc6a) to head (b23bb47).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

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.

@JoeWang1127 JoeWang1127 marked this pull request as ready for review February 14, 2026 15:53
@JoeWang1127 JoeWang1127 requested a review from a team as a code owner February 14, 2026 15:53
@JoeWang1127 JoeWang1127 enabled auto-merge (squash) February 14, 2026 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant