github-watchdog
v1.2.0
Published
Detect github commit crime
Downloads
2
Readme
Your github watchdog
Verify commits for containing / not containing specified strings and stuff.
Send alert emails if test fails.
Installation
npm install github-watchdog
Sample usage
Setup github repo hook (only push events) to http://your-server.com/push
url, where http://your-server.com
domain of github-watchdog
application.
Example application config:
var startWatchdog = require('github-watchdog');
startWatchdog({
port: 3333,
alerting: {
mailer: {
service: 'Mandrill',
auth: {
user: '[email protected]',
pass: '0239c4920ck40jv'
}
},
mailOptions: {
subject: 'ALARM!!! someone failed something',
html: 'User {{ username }} failed at {{ repo }}',
from: 'Github Watchdog <[email protected]>',
to: '[email protected], [email protected]'
},
},
// Check if commit message contains jira id
assertions: {
'username/repo': 'commit message should contain JIRA-'
}
});