fix(license-check): match name:version:license identifier, not bare name - #44
Conversation
pilosus matches the exclude regex against the full 'name:version:license' string, so an anchored '^pkg$' never matches. Anchor the name then allow the version separator or end-of-string for both the self-exclusion and the central tqdm whitelist.
📝 WalkthroughWalkthroughTwo regex patterns inside the license-check GitHub Actions workflow are updated. The self-package exclude pattern is broadened to match pilosus-style ChangesLicense-check workflow regex fixes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/license-check.yml:
- Line 158: The regex pattern for tqdm in the license-check.yml workflow has
been updated to (?i:^tqdm(?::|$)), but the documented whitelist pattern in
docs/license-whitelist.md still shows the old ^tqdm$ form. Update the tqdm entry
in docs/license-whitelist.md to use the new regex pattern (?i:^tqdm(?::|$)) to
ensure the documentation matches the actual workflow behavior and maintains the
source-of-truth contract.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 335cf666-a1eb-47e1-bb91-7899e3b18105
📒 Files selected for processing (1)
.github/workflows/license-check.yml
| # tqdm — dual-licensed MPL-2.0 AND MIT; permissive via the MIT option, | ||
| # used as an unmodified imported library (pulled by huggingface_hub). | ||
| central = r"(?i:^tqdm$)" | ||
| central = r"(?i:^tqdm(?::|$))" |
There was a problem hiding this comment.
Update whitelist documentation to match the new regex contract.
Line 158 updates tqdm to (?i:^tqdm(?::|$)), but the documented source-of-truth pattern still shows the old ^tqdm$ form. Please update docs/license-whitelist.md in the same PR so the human-auditable contract matches the workflow behavior.
As per coding guidelines, “When you change one, change the other to match” in the whitelist documentation/workflow contract.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/license-check.yml at line 158, The regex pattern for tqdm
in the license-check.yml workflow has been updated to (?i:^tqdm(?::|$)), but the
documented whitelist pattern in docs/license-whitelist.md still shows the old
^tqdm$ form. Update the tqdm entry in docs/license-whitelist.md to use the new
regex pattern (?i:^tqdm(?::|$)) to ensure the documentation matches the actual
workflow behavior and maintains the source-of-truth contract.
The
pilosus/action-pip-license-checkerexcluderegex matches against the full package identifier stringname:version:license(e.g.tqdm:4.68.2:Mozilla Public License 2.0), not just the package name.So the anchored patterns introduced for the self-exclusion and central whitelist never matched —
^tqdm$cannot matchtqdm:4.68.2:..., so tqdm kept tripping the WeakCopyleft gate, and the auto-derived package-under-test exclusion (^name$) was a no-op.Both patterns now anchor the name then allow the version separator or end-of-string (
(?::|$)), so they match the identifier without over-matching siblings liketqdm-extra.Summary by CodeRabbit
This pull request contains only internal infrastructure updates with no user-facing changes or new features. The modifications to the license-check workflow do not affect application functionality or user experience.
No user-visible changes in this release.