GithubHelp home page GithubHelp logo

husky-pivotal's Introduction

Husky + Pivotal NPM Version CI Status

Husky hook commands to keep commits tied to Pivotal Tracker stories.

Installation

  1. Set up Husky
  2. npm install husky-pivotal --save-dev
  3. Add one or more of the hook commands to suit your needs:

Hook commands

hup-mkmsg automatically adds story references to new commits

The hup-mkmsg command looks for a Pivotal Tracker Story ID in the current branch name and then uses it to prefill new commit messages with a [#____] format story reference. For example, if you're working in a branch named 123456-new-feature then [#123456] will be prefilled in new commit messages created within that branch.

To use this command, add hup-mkmsg to your Husky prepare-commit-msg hook:

npx husky add .husky/prepare-commit-msg 'npx --no-install hup-mkmsg "$1"'
hup-ckmsg disallows commits without story references

The hup-ckmsg command checks that commit messages contain a [#____] format story reference. The commit is aborted if it doesn't contain a story reference.

To use this command, add hup-ckmsg to your Husky commit-msg hook:

npx husky add .husky/commit-msg 'npx --no-install hup-ckmsg "$1"'
hup-ckbranch disallows commits outside of story branches

The hup-ckbranch command checks that the current branch name contains a Pivotal Tracker Story ID. Commits are aborted if the branch name doesn't contain a Story ID.

To use this command, add hup-ckbranch to your Husky pre-commit hook:

npx husky add .husky/pre-commit 'npx --no-install ckbranch'

License

MIT

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.