jorisroovers / gitlint

Linting for your git commit messages
http://jorisroovers.github.io/gitlint
MIT License
803 stars 99 forks source link

cli: Allow for a single commit in the --commits cmd-line param #412

Closed carlescufi closed 1 year ago

carlescufi commented 1 year ago

In order to avoid applications needing to select between --commit and --commits based on the number of commits, allow for providing a single commit with --commits in the format:

$ gitlint --commits <sha>,

The trailing comma ensures that gitlint knows this is a commit list and not a refspec.

Signed-off-by: Carles Cufi carles.cufi@nordicsemi.no

jorisroovers commented 1 year ago

Thanks for the PR - makes sense 👍

Still needs docs and a unit test (I can take care of that for you if you want).

carlescufi commented 1 year ago

Thanks for the PR - makes sense 👍

Still needs docs and a unit test (I can take care of that for you if you want).

Let me give it a go. If I get stuck I will let you know. Thanks!

carlescufi commented 1 year ago

@jorisroovers done, please take another look. Thanks!

jorisroovers commented 1 year ago

Tested locally, works well!

Merging 👍

carlescufi commented 1 year ago

Tested locally, works well!

Merging 👍

Thanks for the speedy review and merging!