Skip to content

Commit 9903747

Browse files
otherguyjanniks
authored andcommitted
Strip punctuation from the end of commit message (#16)
* Strip punctuation from the end of commit message * Update scripts/prepare-commit-msg Co-Authored-By: otherguy <alex@basecamp.tirol>
1 parent 598e47f commit 9903747

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

scripts/prepare-commit-msg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ if !issue_number
6262
end
6363

6464
# combine to new message
65-
new_commit_message = "[#{issue_number}] #{original_commit_message}"
65+
new_commit_message = "[#{issue_number}] #{original_commit_message.gsub(/(\s[[:punct:]])+$/, '')}"
6666

6767
# write new commit messge to file
6868
File.open(commit_file, 'w') do |f|

0 commit comments

Comments
 (0)