Quantcast
Channel: Evilprofessor.co.uk » buddycloud
Viewing all articles
Browse latest Browse all 2

Update a buddycloud channel when events take place on your github repository

$
0
0

As of this evening it is now possible to have Github post to a buddycloud channel when a push is made to a repository. This allows you to get (amost) real-time repository change information in your buddycloud channels.

Background

I’ve talked about work I’ve done with buddycloud before, but briefly buddycloud is an exciting new federated social network built upon open-source and open-standards. The buddycloud team has recently come back from San Francisco where they were involved with Mozilla’s WebFWD programme getting some great mentoring and guidance from luminaries in their fields. I don’t think I need to really introduce github, they are awesome too :)

If you’re not aware of them github has a set of service hooks that as a repository owner/admin you can utilise in order to push event information (be it commits, pushes, pull requests, branching, etc) to a 3rd party service. There’s a whole set of these services that you can already push to from Jenkins CI right through to Yammer, and now buddycloud!

If you have a service that you’d like to push event information to then github make the code available. All you have to do is fork the service-services repository, knock up some ruby code and submit a pull request. Once it’s been accepted you can then setup github to push information to your favourite information system each time something happens to your repository.

Instructions

Firstly you’ll need a buddycloud channel to which you can post, and additionally be the admin of a github respository.  In this example we’re going to use a user called github-hooks@buddycloud.org and we’re going to post to the github@topics.buddycloud.org topic channel (although it could just as easily be a personal channel).

Navigate to your chosen github respository and click the ‘Admin’ link in the top right hand corner:

Next choose ‘service hooks’ and then select the ‘buddycloud’ option:

Lastly, fill in the configuration. At present the service-hook will only post to the posts node so there’s no configuration there. You can also choose the level of detail you receive from github be that summary commit details, brief details, or a whole mega-list of details.

See it in action…

We’ve already got the github service hook posting to a channel each time the new web-client merges in a pull request:  https://beta.buddycloud.org/github@topics.buddycloud.org.

Next steps

Currently the buddycloud service-hook only responds to pushes to the repository. I think this is because originally only this event was supported (feel free to correct me in the comments section), but now the API has opened up to include a whole host of events. So over the next few weeks I’ll look at adding a full set of events handling to the service-hook to really make this a really valuable tool.

If you’d like to help, please either fork github’s services repository directly or fork my fork and we can get some code done together.

TL;DR

You can post to a buddycloud channel when an event takes place on your github respository. See the service hooks in the admin area on github.

 


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images