Using commit hooks

Follow

Overview

Use commit hooks to update bugs quickly from commit log messages. That way, you can say things like "Changed X to Y, this fixes BH-123" and it will update your BugHerd bug 123 with that message, and change the state to done. Commit hooks are currently available for GitHub and Bitbucket.

Screen_Shot_2013-07-02_at_11.39.10_AM.png

Here's how it works:

  • If you reference any valid bug number, preceded by BH- the commit message will be added to that bug. For example: "Some changes related to BH-1"
  • Using the word "closes" just before the bug reference, will change the state to closed. Example: "Closes BH-1"
  • Using the word "fixes" just before the bug reference, will change the state to done. Example: "Fixes BH-1"
  • Using the word "started" just before the bug reference, will change the state to doing. Example: "Started BH-1"
  • Using the word "planned" just before the bug reference, will change the state to todo. Example: "Planned BH-1
  • You can also use the exact name of the state you want the bug in instead of the phrasing above (backlog, todo, doing, done).
  • You can reference multiple bugs at once by separating references with a comma. Example: "Fixes BH-1,2,3".
  • You can make multiple references and phrases in the same message. Example: "Fixed BH-1,2. Started BH-3"
The bug(s) will be updated when the commit is pushed to any branch, the first time only.

Configuration

Go to the project you wish to connect and select commit hook from the project menu.

Screen_Shot_2013-07-02_at_11.59.06_AM.png

This will open the commit hook setup screen:

Screen_Shot_2012-10-23_at_4.07.55_PM.png

Copy the code in the text box, then open GitHub, go to the project you administer and click Admin. Under Service Hooks, find BugHerd and paste the value into the Project Key field.

Screen_Shot_2012-03-06_at_5.36.57_PM.png

For Bitbucket, copy the web hook provided and go to Settings > Services. Select POST from the Service type, click Add service and paste into the URL field. Click Save.

Screen_Shot_2012-10-23_at_4.15.36_PM.png

Please ensure you have the Active box ticked and click Update Settings when done.

Have more questions? Submit a request

Comments

Powered by Zendesk