diff options
author | Howard P. Logsdon <howard@hplogsdon.com> | 2015-04-24 11:45:17 -0600 |
---|---|---|
committer | Howard P. Logsdon <howard@hplogsdon.com> | 2015-04-30 22:02:28 -0600 |
commit | 4c63ef932bc2b573cd9306066993f72c1cb8dc83 (patch) | |
tree | 3b26f21873330db918237bd63c9a11404e2ec4e9 /app/workers | |
parent | 3bbd2f55a299b31a702b7ae6aa2624e5116bc8e8 (diff) | |
download | gitlab-ci-4c63ef932bc2b573cd9306066993f72c1cb8dc83.tar.gz |
HipChat Notification Service
* Move existing Slack service spec into a subdir, mirroring /app
* Wire up HipChat service to the project and services controller.
* Split the message building into own class.
* 'namespace' room and token variables.
* Enforce v2 client (bug in HipChat gem v1.5.0. fixed in 1.5.1). Note
that I'm using the same version string as GitLab-CE, for shared
installations.
* Defer execution to a notifier worker, like the Slack service.
* Ensure passing specs (basically a Slack service spec copy, fwiw)
* Added change to the CHANGELOG
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/hip_chat_notifier_worker.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/workers/hip_chat_notifier_worker.rb b/app/workers/hip_chat_notifier_worker.rb new file mode 100644 index 0000000..5bc7dda --- /dev/null +++ b/app/workers/hip_chat_notifier_worker.rb @@ -0,0 +1,9 @@ + +class HipChatNotifierWorker + include Sidekiq::Worker + + def perform(room, token, message, options={}) + client = HipChat::Client.new(token, api_version: 'v2') # v1.5.0 requires explicit version ( + client[room].send("GitLab CI", message, options) + end +end |