JaKXz / jira-prepare-commit-msg

Husky Git hook to add JIRA ticket ID into the commit message.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

jira-prepare-commit-msg

Husky command to add JIRA ticket ID into the commit message if it is missed.

The JIRA ticket ID is taken from a git branch name

Installation

Install the package using NPM

npm install husky jira-prepare-commit-msg --save-dev

Configuration

Inside your package.json add a standard husky npm script for the git hook:

{
  "scripts": {
    "prepare-commit-msg": "jira-prepare-commit-msg"
  }
}

Supported pattern

The following patterns are currently supported:

  • /([A-Z]+-\d+)/i

TODO

  • Support user patterns
  • Support configuration (package.json)
  • Lint
  • Tests

License

MIT

About

Husky Git hook to add JIRA ticket ID into the commit message.

License:MIT License


Languages

Language:JavaScript 100.0%