Skip to content

Conversation

@agustingroh
Copy link
Contributor

@agustingroh agustingroh commented Jan 12, 2026

Summary by CodeRabbit

Bug Fixes

  • Fixed missing component URLs in results to ensure complete information is displayed across all scenarios.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 12, 2026

📝 Walkthrough

Walkthrough

The PR documents and implements a fix for missing component URLs. The changelog entry for version 0.12.2 marks this issue as resolved. Code changes in all_urls.go add project URL retrieval via purlutils, and in dependency.go, URL and Component field assignments are moved earlier in the execution flow to ensure population even when licenses are absent.

Changes

Cohort / File(s) Summary
Documentation
CHANGELOG.md
Added unreleased section for v0.12.2 documenting the fix for "Included missing component URLs"; updated version reference links to include the new release.
URL Retrieval Logic
pkg/models/all_urls.go
Added project URL retrieval via purlutils.ProjectUrl() in buildFallbackURL() to populate the URL field; logs errors on retrieval failure but continues execution.
Field Assignment Timing
pkg/usecase/dependency.go
Moved depOutput.URL and depOutput.Component field assignments to occur immediately after URL resolution, ensuring these fields are populated regardless of license availability.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

Hoppin' through the code with gleeful bounds, 🐰
Missing URLs hiding all around,
Now they're fetched and properly placed,
Every component's found its rightful space! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly describes the main change: including missing component URLs in fallback responses, which aligns with the modifications across all three files (CHANGELOG, all_urls.go, and dependency.go).
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 477db3b and 330f8ea.

📒 Files selected for processing (3)
  • CHANGELOG.md
  • pkg/models/all_urls.go
  • pkg/usecase/dependency.go
🔇 Additional comments (3)
pkg/models/all_urls.go (1)

266-270: LGTM! URL is now populated in fallback responses.

The fix correctly addresses the missing component URL issue by retrieving the project URL via purlutils.ProjectUrl and assigning it to url.URL. The error logging approach is appropriate for a fallback path.

Minor observation: Line 253 uses url.URL, _ = purlutils.ProjectUrl(...) (ignoring error), while this new code logs the error. The inconsistency is acceptable since this is the fallback path where logging is more valuable for debugging.

pkg/usecase/dependency.go (1)

79-84: LGTM! URL and Component are now populated before the early return.

Moving these assignments before the empty license check ensures depOutput.URL and depOutput.Component are populated in the response even when no license data is available. This correctly addresses the missing component URL issue.

CHANGELOG.md (1)

12-14: LGTM! Changelog entry properly documents the fix.

The entry correctly describes the fix and follows the Keep a Changelog format.


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.

@agustingroh agustingroh added the bug Something isn't working label Jan 12, 2026
@agustingroh agustingroh requested a review from eeisegn January 12, 2026 14:41
@agustingroh agustingroh merged commit 31c4fa6 into main Jan 13, 2026
3 checks passed
@agustingroh agustingroh deleted the bug/include-missing-component-url branch January 13, 2026 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants