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

Migrate VCS plugins to new plugin API #9746

Merged
merged 5 commits into from
Jan 15, 2025
Merged

Migrate VCS plugins to new plugin API #9746

merged 5 commits into from
Jan 15, 2025

Conversation

sschuberth
Copy link
Member

Please have a look at the individual commit messages for the details.

@sschuberth sschuberth requested a review from a team as a code owner January 14, 2025 22:47
@sschuberth sschuberth enabled auto-merge (rebase) January 14, 2025 22:47
Copy link

codecov bot commented Jan 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.08%. Comparing base (9d1a14d) to head (8df4ded).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #9746   +/-   ##
=========================================
  Coverage     68.08%   68.08%           
  Complexity     1293     1293           
=========================================
  Files           249      249           
  Lines          8845     8845           
  Branches        923      923           
=========================================
  Hits           6022     6022           
  Misses         2434     2434           
  Partials        389      389           
Flag Coverage Δ
funTest-docker 65.02% <ø> (ø)
funTest-non-docker 33.30% <ø> (ø)
test-ubuntu-24.04 35.91% <ø> (ø)
test-windows-2022 35.89% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@@ -202,7 +197,7 @@ abstract class VersionControlSystem {
fun isApplicableUrl(vcsUrl: String): Boolean {
if (vcsUrl.isBlank() || vcsUrl.endsWith(".html")) return false

return isApplicableType(VcsHost.parseUrl(vcsUrl).type) || isApplicableUrlInternal(vcsUrl)
return type == VcsHost.parseUrl(vcsUrl).type || isApplicableUrlInternal(vcsUrl)
Copy link
Member

Choose a reason for hiding this comment

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

The removal of the public isApplicableType function should make this a breaking change.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I was a bit torn between keeping isApplicableType() (and using it more consistently), or removing it as it's so trivial. Any preference?

Copy link
Member

Choose a reason for hiding this comment

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

Not really, we don't use it in the server code either, so I guess it's fine to remove it.

This is a fixup for debbc8d.

Signed-off-by: Sebastian Schuberth <[email protected]>
The `isAvailable()` function just calls `isInPath()` on the
`CommandLineTool`, which is the function being mocked. So these
assertions test close to nothing.

Signed-off-by: Sebastian Schuberth <[email protected]>
This allows to simplify some code.

Signed-off-by: Sebastian Schuberth <[email protected]>
@sschuberth sschuberth merged commit 87b4c04 into main Jan 15, 2025
26 checks passed
@sschuberth sschuberth deleted the vcs-ksp-plugins branch January 15, 2025 08:35
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.

2 participants