@funk-team/branch-naming-check

1.0.0 • Public • Published

branch-naming-check

Enforce naming conventions on git branches

branch-naming-check is a tool that checks whether or not the current branch of a git project match a certain name pattern (specified as a regular expression). This tool is primarily used as a git hook to enforce teams naming conventions.

Install

npm install --save-dev @funk-team/branch-naming-check

Usage

branch-naming-check <regex>

As a git hook using Husky (recommended) add a precommit (or prepush) script to your project's package.json file:

{
  "scripts": {
    "precommit": "branch-naming-check '(feature|release|hotfix)/\\d+/(JIRA-\\d+_)?[a-z-]+'",
  },
  "devDependencies": {
    "husky": "^0.14.3"
  }
}

Dependencies (0)

    Dev Dependencies (6)

    Package Sidebar

    Install

    npm i @funk-team/branch-naming-check

    Weekly Downloads

    1

    Version

    1.0.0

    License

    ISC

    Unpacked Size

    2.41 kB

    Total Files

    4

    Last publish

    Collaborators

    • franzskuffka