Repository Web Hooks are here!

Posted by janschulzhofen 4 months ago |
planio tricks

You’ve asked for it and we listened. Many of you are using Planio’s hosted Git and Subversion repositories┬áin combination with external services, such as continuous integration or build servers. In order to avoid polling in these scenarios, it is helpful when your external services get notified about new commits pushed to your repositories on Planio.

Enter web hooks. As a project manager, you can now specifiy a URL in your repository settings which Planio will send an HTTP POST request to whenever a new commit is pushed to our servers. The payload of these requests is JSON and looks like this:

{
  "repository":{
    "name":"my-repo",
    "id":23
  },
  "project":{
    "name":"My little project",
    "id":42,
    "identifier":"my-little-project"
  },
  "hostname":"mycompany.plan.io"
}

Now, you can build a simple web server in your favorite programming language that listens on an HTTP URL for POST requests and triggers your continuous or build process.

To test Planio’s new web hooks, we highly recommend RequestBin, a neat little service that shows you details about HTTP requests received including all headers, etc. For instance, if you paste a RequestBin URL as web hook URL in Planio, you’ll see exactly what and when Planio is POSTing.

We hope you like the new web hooks and would love to learn what you are building with them. If you integrate Planio with any third party software via web hooks, let us know in the comments!

comments powered by Disqus