blob: 680c02c47a423ab575eceb2699183c5035f6e0bb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
import * as express from 'express';
const createHandler = require('github-webhook-handler');
import config from '../../conf';
module.exports = (app: express.Application) => {
if (config.github_bot == null) return;
const handler = createHandler({
path: '/hooks/github',
secret: config.github_bot.hook_secret
});
app.post('/hooks/github', handler);
handler.on('*', event => {
console.dir(event);
});
};
|