forked from keritaf/redmine_mattermost
-
Notifications
You must be signed in to change notification settings - Fork 2
/
init.rb
38 lines (33 loc) · 1.15 KB
/
init.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
require 'redmine'
require_dependency 'redmine_rocketchat/listener'
Redmine::Plugin.register :redmine_rocketchat do
name 'Redmine Rocket.Chat'
author 'Egon Zemmer'
url 'https://github.com/phlegx/redmine_rocketchat'
author_url 'https://phlegx.com'
description 'Rocket.Chat integration'
version '0.6.1'
requires_redmine :version_or_higher => '2.0.0'
settings \
:default => {
'callback_url' => 'https://rocket.chat/hooks/my_rocket_chat_token',
'channel' => 'redmine',
'icon' => 'https://raw.githubusercontent.com/phlegx/redmine_rocketchat/assets/icon.png',
'username' => 'redmine.bot',
'display_watchers' => '0',
'auto_mentions' => '1',
'post_updates' => '1',
'new_include_description' => '1',
'updated_include_description' => '1',
'post_private_issues' => '1',
'post_private_notes' => '1',
'post_wiki_updates' => '0'
},
:partial => 'settings/rocketchat_settings'
end
ActionDispatch::Callbacks.to_prepare do
require_dependency 'issue'
unless Issue.included_modules.include? RedmineRocketchat::IssuePatch
Issue.send(:include, RedmineRocketchat::IssuePatch)
end
end