Skip to content

Commit

Permalink
Accept American and British spellings (License/Licence) of header (
Browse files Browse the repository at this point in the history
…#60)

Signed-off-by: Simon Deziel <[email protected]>
  • Loading branch information
simondeziel authored Nov 7, 2024
1 parent 51858b7 commit 1fabf3a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ function hasImplicitLicense(commit_message) {
for (var i = 1; i < lines.length; i++) {
// Remove any trailing `\r` char
const line = lines[i].replace(/\r$/,'');
const license = line.match(/^License: ?(.+)$/);
// Accept both American and British spellings (`License` and `Licence`)
const license = line.match(/^Licen[cs]e: ?(.+)$/);
if (license && implicitLicenses.includes(license[1])) {
return license[1];
}
Expand Down

0 comments on commit 1fabf3a

Please sign in to comment.