5
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Hubot の redmine_notifier を入れて Redmine と Hubot を連携する

Posted at

はじめに

Redmine のチケットが新規作成されたり更新されたりしたら Hubot に通知するようにします。

想定環境

  • Windows 7
  • Bitnami Redmine Stack (今回はインストール済みの2.5.0-0を使いました)
  • localhost で動かしている Let's Chat に Hubot が接続済み
  • Hubot の環境変数 PORT で、HTTP ポートは 5080 で待ち受けしている

Hubot の設定

C:\PATH\TO\Hubot>npm install --save hubot-redmine-notifier
external-script.json
[
  "hubot-redmine-notifier"
]

設定後、Hubot を再起動する。

Redmine の設定

https://github.com/suer/redmine_webhook をインストールする。

  • htdocs/plugins/redmine_webhook に git なり Download ZIP なりで取得した一式を入れる
  • htdocs/plugins で bundle install --no-deployment する。←これを忘れてて Faraday というHTTP通信ライブラリがなくてはまった(エラーメッセージもライブラリが無いって風に見えないのでますますはまった)
  • htdocs で bundle exec rake redmine:plugins:migrate RAILS_ENV=production する。

--no-deployment はなんかエラーメッセージで出てきたので意味が分かっていない。

プロジェクトの設定

通知を行うプロジェクトの設定画面で、Webhook のタブが出来ているので選択し、以下のように入れる。room_id はブラウザで見て確認しましょう。

http://localhost:5030/hubot/redmine-notify?room=<room_id>

これでチケットの新規発行や更新のたびにチャットに流れる・・・はず。

5
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?