Skip to content

versionone/git-hooks

Repository files navigation

VersionOne Git Hooks

So you can be lazy and make the computer do the boring stuff!

Current Hooks

  • Auto-reference Asset ID in Commit Message: prepare-commit-message

    When you git commit, this hook will inspect the current branch name looking for a VersionOne ID. If it finds one, it will append it to the commit message for you, magically! You'll have an opportunity to edit or remove it if you like (assuming you did't do git commit -m "...").

    Also, if you've already mentioned the asset in your commit message, the hook leaves things exactly as they are.

    Examples:

    • branch named user_profile_autosaves_S-12345 will add S-12345 to you commit message
    • branch named D-11223 will add D-11223 to your commit message
    • branch named S-98765-allow-multiple-owers will add S-98765 to your commit message

Have some hooks you'd like to see? Let us know. Or better yet, fork, add your hook, and send us a Pull Request!

Installing

Currently you need to download both the prepare-commit-message hook and supporting lib/ directory, putting them in the .git/hooks/ directory of each repository you want to use the hooks with.

If you trust us, in your shell cd your/git/repo/root and execute the following:

(cd .git/hooks && curl -LsSfO "https://github.com/versionone/git-hooks/raw/master/prepare-commit-msg" && mkdir -p lib && cd lib && curl -LsSfO "https://github.com/versionone/git-hooks/raw/master/lib/gittr.rb")

License

VersionOne Git Hooks are covered under the MIT License. See LICENSE for more information.

VersionOne ID

Current ID's look like

  • Acceptance Test : AT-01234
  • Defect : D-01234
  • Environment : ENV-01234
  • Goal : G-01234
  • Issue : I-01234
  • Regression Plan : RP-01234
  • Regression Suite : RS-01234
  • Regression Test : RT-01234
  • Request : R-01234
  • Story : S-01234
  • Task : TK-01234
  • Test Set: TS-01234
  • Theme : TH-01234

About

Some useful git-hooks for integrating with VersionOne

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published