Skip to content

chore(commits): Adds Commit Hooks to build #5084

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

Merged
merged 1 commit into from
Feb 9, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,11 @@ We have very precise rules over how our git commit messages can be formatted. T
readable messages** that are easy to follow when looking through the **project history**. But also,
we use the git commit messages to **generate the UIGrid change log**.

Alternatively you can install [commitizen](https://github.com/commitizen/cz-cli) **OR**
use the wizard. To use the wizard, run `npm run commit` in your terminal after staging your changes in git.

### Commit Message Format
**If you do not follow this style guide your commit message will fail to be created.**
Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
format that includes a **type**, a **scope** and a **subject**:

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![Build Status](https://api.travis-ci.org/angular-ui/ui-grid.png?branch=3.0)](https://travis-ci.org/angular-ui/ui-grid) [![Coverage Status](https://coveralls.io/repos/angular-ui/ui-grid/badge.png?branch=master)](https://coveralls.io/r/angular-ui/ui-grid?branch=master)
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/angular-ui/ui-grid?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
[![npm](https://img.shields.io/npm/dm/angular-ui-grid.svg)](https://www.npmjs.com/package/angular-ui-grid)
[![npm](https://img.shields.io/npm/dt/angular-ui-grid.svg)](https://www.npmjs.com/package/angular-ui-grid)

Expand Down
2 changes: 1 addition & 1 deletion grunt/aliases.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

module.exports = function (grunt, options) {
var baseTasks = {
'install': ['shell:bower-install', 'shell:protractor-install'],
'install': ['shell:bower-install', 'shell:protractor-install', 'shell:hooks-install'],

// register before and after test tasks so we don't have to change cli
// options on the CI server
Expand Down
3 changes: 3 additions & 0 deletions grunt/shell.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,8 @@ module.exports = {
},
'bower-install': {
command: 'node ./node_modules/bower/bin/bower install'
},
'hooks-install': {
command: 'npm run init'
}
};
19 changes: 17 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"test": "test"
},
"scripts": {
"test": "grunt"
"init": "validate-commit-msg",
"test": "grunt",
"commit": "git-cz"
},
"repository": {
"type": "git",
Expand All @@ -33,6 +35,8 @@
"bower": "^1.3.8",
"canonical-path": "0.0.2",
"coveralls": "^2.11.1",
"cz-conventional-changelog": "^1.1.5",
"ghooks": "^1.0.3",
"grunt": "~0.4",
"grunt-angular-templates": "~0.5",
"grunt-bump": "0.0.15",
Expand Down Expand Up @@ -72,6 +76,17 @@
"selenium-webdriver": "~2.46.0",
"semver": "~2.2.1",
"shelljs": "~0.2.6",
"time-grunt": "~1.1.0"
"time-grunt": "~1.1.0",
"validate-commit-message": "^3.0.1"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
},
"ghooks": {
"commit-msg": "validate-commit-msg",
"post-merge": "npm install",
"post-rewrite": "npm install"
}
}
}