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

Run in command line #21

Open
ZhaoXiangXML opened this issue Jun 8, 2022 · 3 comments
Open

Run in command line #21

ZhaoXiangXML opened this issue Jun 8, 2022 · 3 comments

Comments

@ZhaoXiangXML
Copy link

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.

@legend80s
Copy link
Owner

legend80s commented Jun 8, 2022

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

@legend80s
Copy link
Owner

How to get the commit messages from sha1 to sha2?

@legend80s
Copy link
Owner

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants