mirror of
https://github.com/dolphin-emu/redmine_webhook.git
synced 2026-01-31 01:15:19 +01:00
Refactor: skip_webhook
This commit is contained in:
@@ -2,11 +2,10 @@ module RedmineWebhook
|
||||
class WebhookListener < Redmine::Hook::Listener
|
||||
|
||||
def skip_webhooks(context)
|
||||
request = context[:request]
|
||||
if request.headers['X-Skip-Webhooks']
|
||||
return true
|
||||
end
|
||||
return false
|
||||
return true unless context[:request]
|
||||
return true if context[:request].headers['X-Skip-Webhooks']
|
||||
|
||||
false
|
||||
end
|
||||
|
||||
def controller_issues_new_after_save(context = {})
|
||||
|
||||
Reference in New Issue
Block a user