git-commit-msg-linter icon indicating copy to clipboard operation
git-commit-msg-linter copied to clipboard

Run in command line

Open ZhaoXiangXML opened this issue 3 years ago • 3 comments
trafficstars

Is it possible to run the script for a range of commits from command line?

Something like:

commit-msg-linter sha1 sha2

So it can be ran from CI to make sure every commit message from sha1 and sha2 are valid.

ZhaoXiangXML avatar Jun 08 '22 14:06 ZhaoXiangXML

~it can't. You can check it out in https://github.com/legend80s/commit-msg-linter#how-it-works~

legend80s avatar Jun 08 '22 15:06 legend80s

How to get the commit messages from sha1 to sha2?

legend80s avatar Feb 09 '23 14:02 legend80s

How to get the commit messages from sha1 to sha2?

git log sha1..sha2 --pretty=format:%s

output

msg1
msg2
msg3

What is your expected output of commit-msg-linter sha1 sha2? Just exit with code 1 and print the invalid msg list?

legend80s avatar Feb 09 '23 14:02 legend80s