Skip to content

fix(cli): remove duplicate v prefix in version check URL#2555

Merged
jakobmoellerdev merged 3 commits into
open-component-model:mainfrom
jakobmoellerdev:fix/version-check-url-double-v
May 18, 2026
Merged

fix(cli): remove duplicate v prefix in version check URL#2555
jakobmoellerdev merged 3 commits into
open-component-model:mainfrom
jakobmoellerdev:fix/version-check-url-double-v

Conversation

@jakobmoellerdev

@jakobmoellerdev jakobmoellerdev commented May 18, 2026

Copy link
Copy Markdown
Member

What this PR does / why we need it

removes a duplicated v prefix on the tag that caused weird versioning lookup strings that cant be copy pasted.

Which issue(s) this PR fixes

follow up to open-component-model/ocm-project#1044

Testing

How to test the changes

Required files to test the changes:

Commands that test the change:

go build -ldflags="-X ocm.software/open-component-model/cli/cmd/version.BuildVersion=0.0.1" -o /tmp/ocm-demo .
alias ocm=/tmp/ocm-demo
ocm # should trigger notification
Verification
  • Tests pass locally (task test and task test/integration if applicable)
  • My changes do not decrease test coverage
  • I have tested the changes locally by running ocm

@coderabbitai

coderabbitai Bot commented May 18, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Updated the GitHub releases URL construction in the version check warning message to avoid duplicating a version prefix. The fmt.Sprintf format string now correctly combines DefaultTagPrefix and LatestVersion when building the releases/tag URL path.

Changes

Version Check URL Formatting

Layer / File(s) Summary
GitHub releases URL formatting
cli/cmd/setup/versioncheck.go
The printUpgradeWarning function's URL construction adjusted to build the releases/tag/... path using DefaultTagPrefix and LatestVersion without duplicating a v prefix in the format string.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

A v was duplicated, now it's gone,
The URL path flows true and strong,
The prefix prefix prefix—no more!
Version tags aligned in core. 🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: removing a duplicate 'v' prefix in the version check URL, which matches the changeset's primary purpose.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The PR description clearly explains the issue (duplicate v prefix in version check URL), references the related issue, provides testing instructions, and confirms verification steps were completed.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added kind/bugfix Bug size/xs Extra small labels May 18, 2026
@netlify

netlify Bot commented May 18, 2026

Copy link
Copy Markdown

Deploy Preview for ocm-website ready!

Name Link
🔨 Latest commit ef4d4f1
🔍 Latest deploy log https://app.netlify.com/projects/ocm-website/deploys/6a0b03ad218e350008683bae
😎 Deploy Preview https://deploy-preview-2555--ocm-website.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@jakobmoellerdev jakobmoellerdev force-pushed the fix/version-check-url-double-v branch from 2499035 to 314fcec Compare May 18, 2026 05:38
On-behalf-of: @SAP <jakob.moeller@sap.com>
Signed-off-by: Jakob Möller <contact@jakob-moeller.com>
On-behalf-of: @SAP <jakob.moeller@sap.com>
@jakobmoellerdev jakobmoellerdev force-pushed the fix/version-check-url-double-v branch from 314fcec to f958aa2 Compare May 18, 2026 05:40
@jakobmoellerdev jakobmoellerdev marked this pull request as ready for review May 18, 2026 06:06
@jakobmoellerdev jakobmoellerdev requested a review from a team as a code owner May 18, 2026 06:06
@jakobmoellerdev jakobmoellerdev enabled auto-merge (squash) May 18, 2026 12:18
@jakobmoellerdev jakobmoellerdev merged commit 4ec53c4 into open-component-model:main May 18, 2026
32 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bugfix Bug size/xs Extra small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants