SyllaJay / enforce-branch-name

Little utility to be used in conjunction with Husky to enforce a branch naming convention

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

enforce-branch-name

package version package downloads standard-readme compliant package license make a pull request

Little utility to be used in conjunction with Husky to enforce a branch naming convention

Table of Contents

Install

This project uses node and npm.

First make sure husky is installed. Then install enforce-branch-name:

$ npm install --save-dev enforce-branch-name
$ # OR
$ yarn add --dev enforce-branch-name

Usage

Now setup your hook:

// package.json
{
  "husky": {
    "hooks": {
      "pre-push": "enforce-branch-name '(hotfix|bugfix|feature)\/.+' --ignore 'staging'",
    }
  }
}

Contribute

  1. Fork it and create your feature branch: git checkout -b my-new-feature
  2. Commit your changes: git commit -am "Add some feature"
  3. Push to the branch: git push origin my-new-feature
  4. Submit a pull request

License

MIT

About

Little utility to be used in conjunction with Husky to enforce a branch naming convention

License:MIT License


Languages

Language:JavaScript 100.0%