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

chore(infrastructure): Add validate-commit-msg hook #4573

Merged
merged 1 commit into from
Jul 21, 2016

Conversation

traviskaufman
Copy link
Contributor

  • 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 helpMessage key, this can always be disabled
by passing the --no-verify option to git-commit.

Part of #4464

"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`."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, though I would suggest adding a minimal sample to the error message.

It might make it too long, though... Can we have newlines?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, is there a description somewhere of what each of the types means? Can't find it on the link.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest adding a minimal sample

Great idea, will add. I don't really mind the length as it probably won't be changed that often.

is there a description somewhere of what each of the types means?

https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#type

@sgomes
Copy link
Contributor

sgomes commented Jul 21, 2016

LGTM, thanks @traviskaufman!

* 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
@traviskaufman traviskaufman merged commit ff30193 into master Jul 21, 2016
@traviskaufman traviskaufman deleted the chore/validate-commit-msg branch July 21, 2016 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants