Skip to content

Commit 7c66fa6

Browse files
Add bin executable statement
1 parent abf9d5c commit 7c66fa6

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,25 @@
44
[![MIT license](http://img.shields.io/badge/license-MIT-brightgreen.svg)](http://opensource.org/licenses/MIT)
55
[![Downloads](https://img.shields.io/npm/dt/jira-smart-commit.svg)](https://www.npmjs.com/package/jira-smart-commit)
66

7-
A Node.js git hook script to prefix commits automatically with the JIRA ticket, based on a branch name.
7+
A Node.js git hook script to prefix commits automatically with the JIRA ticket, based on a branch name.
88

99
## Usage
1010

1111
### Installation
1212
1. Install [Husky](https://www.npmjs.com/package/husky) in your project to configure Git hooks easily
1313
```
1414
npm install --save-dev husky
15-
```
16-
2. Install this package in your project:
15+
```
16+
2. Install this package in your project:
1717
```
1818
npm install --save-dev jira-smart-commit
1919
```
2020
3. Configure scripts in `package.json`. The script expects his first argument to be the JIRA tag of the project.
21+
```
22+
"commitmsg": "jira-smart-commit SPAN"
23+
```
2124
4. Do your git commits like usual. If the branch was prefixed with a JIRA tag, your commit message will get prefixed with
22-
the same tag. E.g.
25+
the same tag.
2326
2427
```
2528
Branch: TAG-411-husky-git-hooks

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jira-smart-commit",
3-
"version": "1.0.1",
3+
"version": "1.0.2",
44
"description": "A githook script that transforms commit messages to JIRA smart commits based on branch names",
55
"author": "Jesse Dobbelaere <[email protected]>",
66
"license": "MIT",
@@ -27,6 +27,9 @@
2727
"husky",
2828
"git hook"
2929
],
30+
"bin": {
31+
"jira-smart-commit": "./index.js"
32+
},
3033
"dependencies": {},
3134
"devDependencies": {
3235
"chai": "4.1.2",

0 commit comments

Comments
 (0)