fix: Update license header pattern to match existing files - #159
Closed
cbartz wants to merge 4 commits into
Closed
Conversation
Change from 'content' to 'pattern' in .licenserc.yaml to properly recognize existing license headers in the codebase. This resolves the failing license header checks that were reporting 19 invalid files. The pattern now correctly matches: Copyright YYYY Canonical Ltd. See LICENSE file for licensing details.
cbartz
requested review from
amandahla and
florentianayuwono
and removed request for
a team
January 28, 2026 11:34
cbartz
enabled auto-merge (squash)
January 28, 2026 16:20
Contributor
Unused entries in .trivyignoreImage: ghcr.io/canonical/content-cache:40d0c23bc44d72b8c11a7c8f4356c8c43e11d4ac-_latest_amd64 The following CVEs are in |
Contributor
Author
|
No longer necessary |
auto-merge was automatically disabled
January 29, 2026 06:20
Pull request was closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Applicable spec: N/A
Overview
Update
.licenserc.yamlto usepatterninstead ofcontentto correctly recognize existing license headers in the codebase.Rationale
The license header check was failing with 19 invalid files (valid: 0, invalid: 19) even though all files have proper license headers in the format:
The issue was that the configuration used
contentwhich expects literal placeholders like[year]and[owner], but the actual files use specific years and "Canonical Ltd.". Usingpatternwith a regex allows matching the actual format.Before:
After:
Testing:
Juju Events Changes
None
Module Changes
None
Library Changes
None
Checklist
urgent,trivial,complex)CHANGELOG.mdis updated with user-relevant changes. - N/A (CI configuration fix, not user-facing)This is a trivial CI configuration fix that resolves failing license header checks.