Fix/update chat notifications for wiki edits #73

Merged
galfert merged 2 commits from bugfix/mediawiki-hubot into master 2019-06-25 12:37:15 +00:00
2 changed files with 8 additions and 5 deletions
Showing only changes of commit fff5a044fe - Show all commits

View File

@ -0,0 +1,3 @@
node.default["mediawiki"]["url"] = "https://wiki.kosmos.org/"
node.default["mediawiki"]["hubot_base_url"] = "http://barnard.kosmos.org:8080"
node.default["mediawiki"]["hubot_room"] = "#kosmos"

View File

@ -140,14 +140,14 @@ ark "MediawikiHubot" do
action :cherry_pick
end
hal8000_freenode_data_bag_item = Chef::EncryptedDataBagItem.load('credentials', 'hal8000_freenode')
webhook_token = hal8000_freenode_data_bag_item['webhook_token']
hubot_credentials = Chef::EncryptedDataBagItem.load('credentials', 'hal8000_freenode')
webhook_token = hubot_credentials['webhook_token']
template "#{node['mediawiki']['webdir']}/extensions/MediawikiHubot/DefaultConfig.php" do
source "MediawikiHubot/DefaultConfig.php.erb"
variables webhook_url: "http://localhost:8080/incoming/#{webhook_token}",
room_name: "#kosmos",
wiki_url: "https://wiki.kosmos.org/"
variables webhook_url: "#{node['mediawiki']['hubot_base_url']}/incoming/#{webhook_token}",
room_name: node['mediawiki']['hubot_room'],
wiki_url: node['mediawiki']['url']
end
ruby_block "configuration" do