https://github.com/theden/slackmine
Bot written in Go that posts newly created Redmine issues to Slack
https://github.com/theden/slackmine
Last synced: 9 months ago
JSON representation
Bot written in Go that posts newly created Redmine issues to Slack
- Host: GitHub
- URL: https://github.com/theden/slackmine
- Owner: TheDen
- Created: 2017-01-07T13:57:59.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-18T13:16:32.000Z (about 9 years ago)
- Last Synced: 2025-07-06T16:43:33.730Z (11 months ago)
- Language: Go
- Homepage:
- Size: 5.86 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# slackmine
Bot that posts newly created Redmine issues to Slack
### Build
```
git clone git@github.com:TheDen/slackmine.git
cd slackmine
go get bytes github.com/mattn/go-redmine github.com/nickschuch/go-slack gopkg.in/alecthomas/kingpin.v2 strconv time
go build slackmine.go
```
`upx` (https://github.com/pwaller/goupx) can also be used to shrink the binary
### Run
```
usage: slackmine --rmid=RMID --rmkey=RMKEY --slack-webhook=SLACK-WEBHOOK []
Bot that posts newly created Redmine issues to Slack.
Flags:
--help Show context-sensitive help (also try --help-long and --help-man).
--rmid=RMID Redmine ID. Passing the option "me" uses the redmine ID of the API key owner
--rmkey=RMKEY Redmine API key
--slack-webhook=SLACK-WEBHOOK Slack webhooks url
--channel="#test_bots" Which slack channel to post to. Also accepts DMs, with @username
--url="https://redmine.com.au"
redmine URL, e.g., https://redmine.youraccount.com.au
--interval=5 interval check time for last ticket/issue (in minutes)
--botname="redmine-bot" Name of the bot when it posts on Slack
--emoji=":redmine:" Which emoji to set for the bot on Slack
--version Show application version.
```
### Example
To have slackmine check every 5 minutes for a new redmine issue for redmine user `3` on the slack channel #sys-ops, simply run:
```
./slackmine --rmkey=xxxxxxxxxx --rmid=3 --slack-webhook=https://hooks.slack.com/services/xxxxxx/xxxxxx/xxxxxx --channel=#sys-ops --interval=5
```
If a new issue is found, slackmine will post it on the `#sys-ops` channel. An issue can also be posted as a direct message on Slack by passing `@username` in the `--channel` arg.