Hapi webhooks plugin for the Screwdriver API
const Hapi = require('@hapi/hapi');
const server = new Hapi.Server();
const webhooksPlugin = require('./');
server.connection({ port: 3000 });
server.register({
register: Plugin,
options: {}
}, () => {
server.start((err) => {
if (err) {
throw err;
}
console.log('Server running at:', server.info.uri);
});
});
Follow instructions from your SCM provider to set up webhooks for your repository or organization:
POST /webhooks