Merge branch 'bugfix/mediawiki-hubot' of kosmos/chef into master

This commit is contained in:
galfert 2019-06-25 12:37:14 +00:00 committed by Gitea
commit 4c7d1a602c
3 changed files with 10 additions and 5 deletions

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

View File

@ -54,4 +54,6 @@ if (!isset($hpc_attached)) die();
$wgHubotMovedArticle = true; $wgHubotMovedArticle = true;
// Article edited // Article edited
$wgHubotEditedArticle = true; $wgHubotEditedArticle = true;
// Article edited, minor change
$wgHubotEditedArticleMinorChange = false;
?> ?>