Tokite send GitHub event (pull-request, issue and comment) to Slack.
Notification setting are personalized and customizable by query.
Tokite works as rails mountable engine.
Add this line to your rails application's Gemfile:
gem "tokite"And mount engine.
Rails.application.routes.draw do
mount Tokite::Engine => "/"
end$ ./bin/rails db:create
$ ./bin/rails app:tokite:ridgepole:install
$ ./bin/rails app:tokite:ridgepole:apply
$ RAILS_ENV=test ./bin/rails app:tokite:ridgepole:apply$ ./bin/rails app:tokite:stylesheet:install| GITHUB_CLIENT_ID | GitHub OAuth2 client ID |
|---|---|
| GITHUB_CLIENT_SECRET | GitHub OAuth2 client secret |
| GITHUB_HOST (optional) | GitHub Enterprise host |
| SECRET_KEY_BASE | rails secret key |
| SLACK_WEBHOOK_URL | Slack incoming webhook url |
| SLACK_NAME (optional) | Slack notification user name |
| SLACK_ICON_EMOJI (optional) | Slack notification icon |
| APP_HOST (optional) | Application host url |
Tokite support only below events now.
- pull_request
- issues
- issue_comment
| Name | Example |
|---|---|
| Plain word | hoge fuga moge |
| Quoted word | "hoge fuga moge" |
| Regular expression word | /hoge|fuga|moge/ |
| Exclude word | -/(hoge|fuga|moge)/ -user:hogelog |
| Name | Description | Example |
|---|---|---|
| repo: | Match repository name. | repo:cookpad/tokite |
| title: | Match pull_request or issues title. | title:Bug |
| event: | Match event type pull_request, issues, issue_comment, pull_request_review, pull_request_review_comment. | event:/pull_request|issues|pull_request_review|pull_request_review_comment/ |
| body: | Match body text. | body:"review please" |
| user: | Match user name. | user:hogelog |
| label: | Match pull_request or issue label. | label:Feature |
| review_state: | Match pull_request_review state. | review_state:/commented|approved|changes_requested/ |
| requested_reviewer: | Match user name of review requested reviewer | requested_reviewer:hogelog |
| requested_team: | Match team name of review requested team | requested_team:cookpad/chef |
| unspecified | Match title or body field. | review please |
To release a new version of the tokite gem, please write CHANGELOG.md, update the version string in lib/tokite/version.rb, and send a pull request for the changes. After merging the pull request, manually approve the run of push_gem.yml at https://github.com/cookpad/tokite/actions/workflows/push_gem.yml to release the new version to RubyGems.org.