Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(commitlint): allow lowercase footer keyword values #187

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion commitlint/commitlint
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ function lint_required_footer_values() {
function verify_changelog(changelog) {
# Strip the CHANGELOG[(fix|feat)] prefix
gsub(CHANGELOG_PREFIX, "", changelog)
if ( match(changelog, "(None|Title|Commit|All|\\S+(\\s+\\S+){2,})") == 0 ) {
if ( match(changelog, "([Nn]one|[Tt]itle|[Cc]ommit|[Aa]ll|\\S+(\\s+\\S+){2,})") == 0 ) {
Copy link

Choose a reason for hiding this comment

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

This is ok, but I was thinking that we can just use case insensitive matchers, like re.IGNORECASE in Python. Not sure what the awk equivalent is. In general I don't think case is significant in any of these fields.

I think this would still not allow changelog: title, for example? And same for ticket. What do you think?

error("Misspelled word in Changelog")
}
}
Expand Down
11 changes: 11 additions & 0 deletions commitlint/testcommitlint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -369,4 +369,15 @@ Ticket: MEN-1234
Signed-off-by: Krzysztof Jaskiewicz <[email protected]>
"


assert "false" \
"Allow lowercase keyword values" \
"feat: extend deployments instruction with artifact id

Changelog: title
Ticket: none

Signed-off-by: Krzysztof Jaskiewicz <[email protected]>
"

exit 0