- Tracks new commits in multiple local Git repositories using
git fetch && git rev-list
- Reports them to Slack channels
- Written in JavaScript — your grandmother can easily read it
- Super-easy no-brain installation
- Filters auto-generated / non-informative messages (NPM version tags, quick fixes in MD files, merge commits)
- Automated tests
You will need NPM.
git clone http://github.com/xpl/git-slack-notify
cd git-slack-notify
npm install
npm start
Default config name will be config.json
. Running with other file:
npm start myconfig.json
If not found, it will be auto-generated with example data:
{
accessToken: '<your Slack OAuth access token here>',
fetchFrequency: 30000, // check for new commits each 30s
repos: [ // you can track multiple repositories
{
name: 'Git Slack Notify', // display name (optional, if not set, will be generated from `dir`)
dir: process.cwd (), // local git repo path
channel: 'general', // where to post
since: '' // this is auto-updated when new commits arrive
}
]
}
- Create a new Slack App at https://api.slack.com/apps
- Activate the "Incoming webhooks" feature
- Click on "Install app to your team" (will generate the token)
- Under "OAuth & Permissions", grab your "OAuth Access Token"