Skip to content

refactor(scoop-info): resolve the license identifier before matching - #6770

Open
abgox wants to merge 4 commits into
ScoopInstaller:developfrom
abgox:abgox/push-mprlnoplvxrq
Open

abgox wants to merge 4 commits into
ScoopInstaller:developfrom
abgox:abgox/push-mprlnoplvxrq

Conversation

@abgox

@abgox abgox commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Description

Resolve the license identifier before matching

Motivation and Context

Closes #6769

How Has This Been Tested?

  • Before

    图片
  • After

    图片

Checklist:

  • I have read the Contributing Guide.
  • I have ensured that I am targeting the develop branch.
  • I have updated the documentation accordingly.
  • I have updated the tests accordingly.
  • I have added an entry in the CHANGELOG.

RetriggerConfidence Score: 5/5

The PR appears safe to merge based on the reviewed changes.

Summary

The PR resolves a license identifier before formatting it and now gives an explicit license URL precedence over generated links.

  • The change preserves the explicit URL for multi-license objects and addresses the two previously reported findings.
  • The changelog records the refactor.

Reviews (4) · Last reviewed commit: "fix(scoop-info): Prefer the manifest URL..."

Comment thread libexec/scoop-info.ps1 Outdated
@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c22776ac-b74d-4bd9-b699-f7f873944676
📥 Commits

Reviewing files that changed from the base of the PR and between 26dc28f and 615b89d.

📒 Files selected for processing (1)
  • libexec/scoop-info.ps1
🚧 Files skipped from review as they are similar to previous changes (1)
  • libexec/scoop-info.ps1

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.


Summary by CodeRabbit

  • Bug Fixes
    • License details now show the identifier from the configured license identifier when available, or the license value otherwise.
    • In verbose output, a supplied license URL is used as the link. Without one, URL identifiers remain unlinked, comma- or pipe-separated identifiers link each component to its SPDX page, and other identifiers link to a single SPDX page.
    • Non-verbose output, and verbose output without a link, shows only the identifier.

Walkthrough

License output now uses license.identifier when present and otherwise uses license. Verbose output uses license.url when supplied or derives SPDX links from the identifier. Non-verbose output shows only the identifier.

Changes

License identifier output

Layer / File(s) Summary
Select and display the license identifier
libexec/scoop-info.ps1, CHANGELOG.md
The output selects license.identifier when present, otherwise license. In verbose mode, it uses license.url when supplied, omits generated links for URL identifiers, and maps other identifiers to SPDX links. The changelog records the formatting update.

Priority: ⬇️ Low

Severity of issue fixed: Low

Merge Risk: 🔵 Low · up to 615b8

Some packages can show a misleading license link in verbose output. This is a bounded issue that can be accepted or corrected before merging.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed [#6769] asks scoop info --verbose to distinguish license from license.identifier. libexec/scoop-info.ps1 now resolves license.identifier when present and uses it as the displayed identifier.…
Out of Scope Changes check ✅ Passed The changes update license display logic in libexec/scoop-info.ps1 and document that change in CHANGELOG.md. Both changes support [#6769]. The diff shows no unrelated changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Title check ✅ Passed The title clearly describes the main change: resolving the license identifier before matching and formatting it.
Description check ✅ Passed The description explains the license identifier change, links it to an issue, and includes before-and-after screenshots.
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2c6e5003-bfe2-4db9-a094-86700e5aa43c
📥 Commits

Reviewing files that changed from the base of the PR and between c2d56bf and 4dd260d.

📒 Files selected for processing (1)
  • libexec/scoop-info.ps1

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

Comment thread libexec/scoop-info.ps1 Outdated
@abgox
abgox force-pushed the abgox/push-mprlnoplvxrq branch from 4dd260d to 0ce2eff Compare October 6, 2026 13:25
@abgox abgox changed the title fix(scoop-info): support license objects without a url refactor(scoop-info): resolve the license identifier before matching Oct 6, 2026
Comment thread libexec/scoop-info.ps1 Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 311d79a6-ffdc-499a-a6d6-b09ef0697f03
📥 Commits

Reviewing files that changed from the base of the PR and between 0ce2eff and 26dc28f.

📒 Files selected for processing (2)
  • CHANGELOG.md
  • libexec/scoop-info.ps1

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

Comment thread libexec/scoop-info.ps1

This branch has not been deployed

No deployments
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