Setting up WebHooks

WebHooks are a fantastic way to integrate Bugify with third-party services (or your own tools). Every time someone makes a change to an issue (or adds a new one, comments on one etc), Bugify will POST the issue details (and details about the change) to the URL you specify.

If you want to run multiple scripts after each change, we recommend you write a central script that calls your other scripts. Point the WebHook URL to your central script.

Bugify sends a JSON string in the body as the raw POST body. The entire POST data is the JSON data.

Note: Prior to v1.4 a single parameter named "payload" was used - this has now changed. We don't like to make these sorts of changes, and apologise in advance for making you change your code.

Processing

A "history" event can have multiple "changes" in it, so you will need to loop through the changes and check the type of each. Below is a list of the types:

  • TYPE_SUBJECT = 0
  • TYPE_DESCRIPTION = 1
  • TYPE_PRIORITY = 2
  • TYPE_PROJECT = 3
  • TYPE_CATEGORY = 4
  • TYPE_STATE = 5
  • TYPE_ASSIGNEE = 6
  • TYPE_MILESTONE = 7
  • TYPE_DATE_RESOLVED = 8
  • TYPE_COMMENT = 9
  • TYPE_ATTACHMENT = 10
  • TYPE_NEW_ISSUE = 12
  • TYPE_PERCENTAGE = 13
  • TYPE_COMMIT = 14

So if the "type" for a change is "12" that means it's a new issue.

Example JSON data

We recommend testing with http://requestb.in to get started.