diff options
Diffstat (limited to 'app/models/hooks/project_hook.rb')
-rw-r--r-- | app/models/hooks/project_hook.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/app/models/hooks/project_hook.rb b/app/models/hooks/project_hook.rb index b625a70b444..a28b97e63e5 100644 --- a/app/models/hooks/project_hook.rb +++ b/app/models/hooks/project_hook.rb @@ -4,6 +4,7 @@ class ProjectHook < WebHook include TriggerableHooks include Presentable include Limitable + extend ::Gitlab::Utils::Override self.limit_scope = :project @@ -29,6 +30,15 @@ class ProjectHook < WebHook def pluralized_name _('Webhooks') end + + def web_hooks_disable_failed? + Feature.enabled?(:web_hooks_disable_failed, project) + end + + override :rate_limit + def rate_limit + project.actual_limits.limit_for(:web_hook_calls) + end end -ProjectHook.prepend_if_ee('EE::ProjectHook') +ProjectHook.prepend_mod_with('ProjectHook') |