mirror of
https://github.com/dolphin-emu/redmine_webhook.git
synced 2026-01-31 01:15:19 +01:00
Merge pull request #1 from AdmanTIC/fixes/1016
Add default webhook configuration if absent from project
This commit is contained in:
@@ -15,6 +15,7 @@ module RedmineWebhook
|
||||
controller = context[:controller]
|
||||
project = issue.project
|
||||
webhooks = Webhook.where(:project_id => project.project.id)
|
||||
webhooks = Webhook.where(:project_id => 0) unless webhooks
|
||||
return unless webhooks
|
||||
post(webhooks, issue_to_json(issue, controller))
|
||||
end
|
||||
@@ -26,6 +27,7 @@ module RedmineWebhook
|
||||
issue = context[:issue]
|
||||
project = issue.project
|
||||
webhooks = Webhook.where(:project_id => project.project.id)
|
||||
webhooks = Webhook.where(:project_id => 0) unless webhooks
|
||||
return unless webhooks
|
||||
post(webhooks, journal_to_json(issue, journal, controller))
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user