Skip to content

Commit

Permalink
chore(infrastructure): Add validate-commit-msg hook
Browse files Browse the repository at this point in the history
* Auto-installs a `commit-msg` hook when `npm (i|install)` is run.
* Ensures that the commit message is formatted properly according to
  angular's conventions.

Note that as outlined in the `helpMsg` key, this can always be disabled
by passing the `--no-verify` option to `git-commit`.

Part of #4464
  • Loading branch information
traviskaufman committed Jul 20, 2016
1 parent bf50ee7 commit 05d3128
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"eslint-config-google": "^0.5.0",
"eslint-plugin-tape": "^1.1.0",
"extract-text-webpack-plugin": "^1.0.1",
"ghooks": "^1.3.2",
"isparta-loader": "^2.0.0",
"istanbul": "^0.4.4",
"karma": "^1.1.1",
Expand All @@ -54,6 +55,7 @@
"stylelint-selector-bem-pattern": "^1.0.0",
"tape": "^4.6.0",
"testdouble": "^1.6.0",
"validate-commit-msg": "^2.6.1",
"webpack": "^1.13.1",
"webpack-dev-server": "^1.14.1"
},
Expand All @@ -64,5 +66,13 @@
"plugins": [
"transform-object-assign"
]
},
"config": {
"ghooks": {
"commit-msg": "validate-commit-msg"
},
"validate-commit-msg": {
"helpMessage": "Invalid commit message %s. Please see https://github.com/conventional-changelog/conventional-changelog/blob/v0.5.3/conventions/angular.md for information on how to format commit messages. Also, if this commit is on a development / WIP branch, you can disable this by running `git commit --no-verify`."
}
}
}

0 comments on commit 05d3128

Please sign in to comment.