1.0.1 • Published 3 years ago

@talentry/elm-git-hooks v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

Elm Git Hooks

Installation

npm install @talentry/elm-git-hooks

Usage

elm-git-hooks <sub command>

This script is meant to be used with Husky

prepare-message

Pre-append a commit message based on a provided regex string matching against git branch name. It will match against the first group found in the string. If a match isn't found, a message is not generated.

Any commit with a commit source eg. merging branches will also be omitted.

elm-git-hooks prepare-message 'JIRA-[0-9]{4}' commit-message-file commit-source?

With Husky

In .husky/prepare-commit-msg append the following line

elm-git-hooks prepare-message 'JIRA-[0-9]{4}' $1 $2

Examples

This repository uses husky, you can see example usage here. Talentry uses ClickUp, so out tickets IDs look like CU-ASDF

LICENSE

MIT