Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(updater): use upgrade config for Maven version updater #1636

Merged
merged 11 commits into from
Feb 19, 2025

Conversation

cuixq
Copy link
Contributor

@cuixq cuixq commented Feb 18, 2025

This PR aligns the flags of update, especially the upgrade-config with fix subcommand.

To be able to parse the upgrade config, this PR moves the parsing function to upgrade package.

The next step is to make comparisonFunctionWithWorkarounds reusable and used in Maven updater as well.

@codecov-commenter
Copy link

codecov-commenter commented Feb 18, 2025

Codecov Report

Attention: Patch coverage is 62.63736% with 34 lines in your changes missing coverage. Please review.

Project coverage is 68.74%. Comparing base (7fe1751) to head (d315ffa).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
cmd/osv-scanner/update/main.go 55.10% 19 Missing and 3 partials ⚠️
internal/remediation/upgrade/config.go 70.96% 7 Missing and 2 partials ⚠️
internal/remediation/suggest/maven.go 70.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1636      +/-   ##
==========================================
- Coverage   68.77%   68.74%   -0.03%     
==========================================
  Files         200      200              
  Lines       18998    19147     +149     
==========================================
+ Hits        13066    13163      +97     
- Misses       5235     5280      +45     
- Partials      697      704       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cuixq cuixq changed the title feat(WIP): Maven version updater feat(updater): use upgrade config for Maven version updater Feb 19, 2025
@cuixq cuixq marked this pull request as ready for review February 19, 2025 03:07
@cuixq cuixq requested a review from michaelkedar February 19, 2025 03:08
@cuixq cuixq merged commit e2eb458 into google:main Feb 19, 2025
13 checks passed
@cuixq cuixq deleted the update branch February 19, 2025 04:16
another-rex pushed a commit to another-rex/osv-scanner that referenced this pull request Feb 20, 2025
)

This PR aligns the flags of `update`, especially the `upgrade-config`
with `fix` subcommand.

To be able to parse the upgrade config, this PR moves the parsing
function to `upgrade` package.

The next step is to make
[`comparisonFunctionWithWorkarounds`](https://github.com/google/osv-scanner/blob/e0206dedd17080021b768526f2a6fde635497c25/internal/remediation/override.go#L271)
reusable and used in Maven updater as well.
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.

3 participants