zachdaniel / git_ops

A tool for version and changelog management in Elixir via conventional commits.
MIT License
129 stars 20 forks source link

Validation of commit message #24

Closed djantea closed 4 years ago

djantea commented 4 years ago

Hi,

This is probably related to the Roadmap point "Validation of commits".

I started to work on a mechanism to automatically validate the Git commit message by using a commit-msg git hook. It uses two mix tasks:

I have pushed these in the following branch: https://github.com/djantea/git_ops/tree/comm_msg_validation

The reasons I have not created the pull request are:

  1. To have a chance to maybe get some feedback from you @zachdaniel to see if this is something that is in the line with what you were thinking
  2. To write test cases for the new introduced mix tasks.

Something that could be part of a subsequent pull request:

  1. To see if there is a way to automatically run mix git_ops.msg_hook when compiling the project that includes git_ops as a dependency, as a way to share the commit message validation mechanism with the team working on the project.
zachdaniel commented 4 years ago

This sounds very exciting! I will have some time to look at this this evening. This is a big contribution, I’m really looking forward to having this functionality.

zachdaniel commented 4 years ago

Sorry, I've been crazy busy lately. This isn't off my radar :D

djantea commented 4 years ago

I have pushed to https://github.com/djantea/git_ops/tree/comm_msg_validation the test cases for the new introduced mix tasks: git_ops.check_message and git_ops.message_hook (renamed it from mix git_ops.msg_hook).

djantea commented 4 years ago

Sorry, I've been crazy busy lately. This isn't off my radar :D

That is fine. Please let me know if you prefer to create the pull request and review from there, or review now from https://github.com/djantea/git_ops/tree/comm_msg_validation and create the pull request after. Thanks.

zachdaniel commented 4 years ago

I've looked over the bulk of the changes, but haven't had a time to do a line-by-line review. However, it looks like an awesome change. Go ahead and make the PR, and I'll do some more in-depth review and get it merged.

djantea commented 4 years ago

Go ahead and make the PR

Done

asummers commented 4 years ago

This can be closed via #25