Notify GitHub pull requests to Slack incoming webhook.
$ go get -u github.com/mnkd/prnotify
$ git clone https://github.com/github/prnotify.git
$ cd prnotify
$ make
$ prnotify
- A dry run will not send any message to Slack.
$ prnotify -d
- Required
- Path
$HOME/.config/prnotify/config.json
{
"app": {
"use_holiday_jp": true,
"use_dayoff": true
},
"github": {
"access_token": "your access_token",
"owner": "owner name",
"repo": "repo name",
"minimum_approved": 2
},
"slack_webhook": {
"team": "your-team",
"channel": "#your-project",
"username": "GitHub | Pull Requests",
"icon_emoji": ":octocat:",
"webhook_url": "https://hooks.slack.com/services/xxxxx/xxxxx/xxxxxx"
}
}
- Optional
- Path
$HOME/.config/prnotify/users.json
- Dictionary for converting github username to slack username.
{
"github_username": "slack_username",
"JohnnyAppleseed": "johnny",
"TaroYamada": "taro"
}