Skip to content

fix(license-check): self-exclude matches underscore + hyphen name forms - #52

Merged
JarbasAl merged 1 commit into
devfrom
fix/license-self-exclude-separators
Jun 16, 2026
Merged

fix(license-check): self-exclude matches underscore + hyphen name forms#52
JarbasAl merged 1 commit into
devfrom
fix/license-self-exclude-separators

Conversation

@JarbasAl

@JarbasAl JarbasAl commented Jun 16, 2026

Copy link
Copy Markdown
Member

Follow-up to #50. The self-package exclude anchors the pip-canonical (hyphenated) name, but pilosus/pip-licenses sometimes reports the resolved requirement with underscores (e.g. ovos_stt_plugin_azure==1.0). A hyphen-only anchor then misses it and the self-package red-fails as Error. Make each separator in the anchor match any of -_. so both forms are excluded. Removes the need for per-repo underscore self-package workarounds.

Summary by CodeRabbit

  • Chores
    • Updated CI workflow package matching logic for improved regex pattern handling.

@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c9f51fe8-ef6b-476f-b2a2-905dba2a28e2

📥 Commits

Reviewing files that changed from the base of the PR and between 724d7d8 and 07c0b77.

📒 Files selected for processing (1)
  • .github/workflows/license-check.yml

📝 Walkthrough

Walkthrough

The Build exclude regex step in .github/workflows/license-check.yml is updated so that the self_pattern PCRE now replaces each normalized hyphen in the package name with a [-_.] character class, making the self-exclusion regex match all common Python package name separator variants.

Changes

License Check Workflow – Self-exclusion Regex

Layer / File(s) Summary
Separator-tolerant self_pattern construction
.github/workflows/license-check.yml
Replaces the single escaped-hyphen substitution with a [-_.] character class for each separator position in the canonicalized package name, so the pilosus full-string name==version exclusion matches packages named with hyphens, underscores, or dots.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • OpenVoiceOS/gh-automations#44: Also modifies the dynamically generated exclude regex in .github/workflows/license-check.yml, specifically how the package name portion is anchored and which separators are allowed for pilosus matching.

Poem

🐇 A hyphen alone left some packages astray,
So I swapped it for [-_.] without delay.
Now dots and underscores, all welcome here,
No package sneaks past — the pattern is clear!
Hop hop, the license check runs without fear. 🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and specifically describes the main change: updating the self-exclude regex to match underscore and hyphen name forms in the license-check workflow.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/license-self-exclude-separators

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.

@JarbasAl
JarbasAl merged commit d2ab625 into dev Jun 16, 2026
1 check passed
@JarbasAl
JarbasAl deleted the fix/license-self-exclude-separators branch June 16, 2026 22:51
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