Fix Webhooks for Drone not working in Gitea 1.16 #387

Merged
raucao merged 1 commits from bugfix/allow_drone_webhooks into master 2022-02-12 16:56:01 +00:00
3 changed files with 13 additions and 1 deletions

View File

@ -4,3 +4,9 @@ node.default["kosmos_gitea"]["binary_url"] = "https://dl.gitea.io/gitea/#{gitea_
node.default["kosmos_gitea"]["binary_checksum"] = "f03f3a3c4dccc2219351cde5c9af372715b2ec3e88a821779702bc6f38084c97"
node.default["kosmos_gitea"]["nginx"]["domain"] = "gitea.kosmos.org"
node.default["kosmos_gitea"]["working_directory"] = "/var/lib/gitea"
node.default["kosmos_gitea"]["config"] = {
"webhook": {
"allowed_host_list" => "external,127.0.1.1"
}
}

View File

@ -90,7 +90,8 @@ template "#{config_directory}/app.ini" do
postgresql_password: gitea_data_bag_item["postgresql_password"],
smtp_host: smtp_credentials["relayhost"],
smtp_user: smtp_credentials["user_name"],
smtp_password: smtp_credentials["password"]
smtp_password: smtp_credentials["password"],
config: node["kosmos_gitea"]["config"]
notifies :restart, "service[gitea]", :delayed
end

View File

@ -85,3 +85,8 @@ ALLOWED_TYPES = image/gif|image/jpeg|image/png|application/zip|application/gzip
MAX_SIZE = 10
; ; Max number of files per upload. Defaults to 5
MAX_FILES = 5
<% if c = @config["webhook"] %>
[webhook]
<% if c["allowed_host_list"] %>ALLOWED_HOST_LIST = <%= c["allowed_host_list"] %><% end %>
<% end %>