launchpad should support post-commit actions via webhooks

Bug #407234 reported by Michael Rooney
This bug report is a duplicate of:  Bug #342729: Should support post-commit webhooks. Edit Remove
30
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Triaged
Low
Unassigned

Bug Description

The post-commit hook is a powerful thing which allows actions such as building and/or testing the software to be automated and provide immediate feedback to the appropriate people. Most VCS allow for this and github provides hooks for this as well, so there is a strong precedent for this, if not a regression of hosting code on Launchpad.

The idea is fairly simple: provide a textbox from the code page which is configured at the project level, allowing for a URL to be specified. This URL will then be POSTed to with certain information such as the branch, revision, author, and log message.

Use cases include:
 * Integration with a continuous integration system such as Hudson/CruiseControl. In the URL box I would put http://myserver/build?job=myproject
 * Posting to a scriptlet (http://www.scriptlets.org/) and performing arbitrary commands such as tweeting based on commit messages
 * Telling a mirror /
 * Performing arbitrary commands on any machining listening for such messages over HTTP such as a deployment server

HTTP is a great choice because it is simple to implement, already a well understood concept by many, and plenty of services are already listening on HTTP and as such would be actionable on Launchpad commits without modification. There's also a nice python library for webhooks available called hookah: http://blog.webhooks.org/2009/03/02/announcing-hookah-the-web-hook-event-dispatcher/ .

Web Hook wiki: http://webhooks.pbworks.com/
GitHub guide: http://github.com/guides/post-receive-hooks

Tags: lp-code
Revision history for this message
Tim Penhey (thumper) wrote :

A first implementation could add hooks on a branch by branch basis, and be handled by a branch job.

Changed in launchpad-code:
status: New → Triaged
importance: Undecided → Medium
Michael Rooney (mrooney)
description: updated
Revision history for this message
Jonathan Lange (jml) wrote :

It's an interesting idea. Really, it should be done in such a way so that hooks can be added to catch all new branch events at the following levels:
  - owned by a Person
  - subscribed by a Person
  - in a project group
  - in a project
  - in source package
  - in a distro source package
  - in a distribution

Since each of these is a meaningful container of branches.

Given that we already have to do something like this for sending out email, the extra effort of having a hook at each of those levels ought not be too hard. If it is, we should make it easier :)

Also, there are murmurings of Launchpad growing a messaging system. If we had something like that, then perhaps this should simply be an XMPP <-> webhook adapter?

Revision history for this message
Karl-Erik Ström (karl-erik-strom) wrote :

cant find a place to mail anybody for help with incorpasion o debia pacage .
How can i tur to ?
Giwe me an e-mailadress pleace.
Regarsa from
<email address hidden>

Curtis Hovey (sinzui)
Changed in launchpad:
importance: Medium → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.