forked from altsol/redmine_mattermost
-
Notifications
You must be signed in to change notification settings - Fork 1
/
init.rb
31 lines (26 loc) · 860 Bytes
/
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
require 'redmine'
require_dependency 'redmine_mattermost/listener'
Redmine::Plugin.register :redmine_mattermost do
name 'Redmine Mattermost'
author 'AltSol'
url 'https://github.com/altsol/redmine_mattermost'
author_url 'http://altsol.gr'
description 'Mattermost chat integration'
version '0.5'
requires_redmine :version_or_higher => '2.0.0'
settings \
:default => {
'callback_url' => 'http://example.com/callback/',
'channel' => nil,
'icon' => 'https://raw.githubusercontent.com/altsol/redmine_mattermost/assets/icon.png',
'username' => 'redmine',
'display_watchers' => 'no'
},
:partial => 'settings/mattermost_settings'
end
ActionDispatch::Callbacks.to_prepare do
require_dependency 'issue'
unless Issue.included_modules.include? RedmineMattermost::IssuePatch
Issue.send(:include, RedmineMattermost::IssuePatch)
end
end