Overdrivr / micro-ci

Continuous Integration for embedded platforms
0 stars 0 forks source link

Scaffold webhook endpoint #5

Closed Overdrivr closed 8 years ago

Overdrivr commented 8 years ago

So that github, bitbucket, etc can alert on commit to create job

DanFaudemer commented 8 years ago

For github have a look to the github package . https://www.npmjs.com/package/github

Specially: http://mikedeboer.github.io/node-github/#repos.prototype.createHook

Overdrivr commented 8 years ago

Seems like a good option indeed, good catch !

Overdrivr commented 8 years ago

Best option for webhooks with Github seem to use the PubSubHubbub technique, less coupling between micro-ci and github. Scaffolded endpoint contains a single payload parameter of type Object, containing a JSON object

JSON object can then be parsed to obtain a lot of information about the received event. See PushEvent for instance