-
Notifications
You must be signed in to change notification settings - Fork 394
Make git commit-msg hook configurable. #454
Conversation
It looks like the regex introduces test failures, but I'm unable to reproduce this issue locally within a project at the moment. |
Looks like it's having some issues parsing project.yml:
|
I suspect that after running |
@@ -20,6 +20,16 @@ git: | |||
# Defining git remotes allows builds deployed via CI. | |||
- [email protected]:bolt8.git | |||
# - [email protected]:radass4.git | |||
commit_message: | |||
regex: "^$BLT-[0-9]+(: )[^ ].{15,}\." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe using single quotes will address the syntax issue.
Still failing after changing to single quote. Perhaps we should tackle the larger discussion about approach from @pinterest-subsites-travis-ci: Is this an appropriate solution to the problem? |
I agree that BLT should provide some default functionality for git-hooks but ultimately should allow projects to configure targets to run during each hooks. I've started a branch to extend the pre-commit task in #474. At this stage, it only allows you to define custom phing targets to run during the pre-commit stage. I think this is okay, projects can defined custom include files which can open up all sorts of Phing magic which can be included in |
I think we should close this PR in favor of the discussion happening in #628. |
As a developer, I would like to make the commit-msg git hook configurable so that I don't have to provide my own git hook setup process that is specific to my project. In particular, I want to configure the regex used to check the commit message format, and provide an alternative instructional response upon failure.
I think this will require some discussion and work to get a solution that doesn't break current installations.