diff options
author | Alexis Reigel <alexis.reigel.ext@siemens.com> | 2017-12-04 15:29:13 +0100 |
---|---|---|
committer | Alexis Reigel <alexis.reigel.ext@siemens.com> | 2018-01-17 09:55:00 +0100 |
commit | a63792b7249d8b49ef9e20ee3bbabd41c22b1ccf (patch) | |
tree | a55194443546f16d5713518d377c75b663513b86 /app/models | |
parent | a78abf3a0071d1705adc562f23be1f3a347c6db5 (diff) | |
download | gitlab-ce-a63792b7249d8b49ef9e20ee3bbabd41c22b1ccf.tar.gz |
accepts `.all` as a hook scope as well
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/concerns/triggerable_hooks.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/concerns/triggerable_hooks.rb b/app/models/concerns/triggerable_hooks.rb index 42f40c52d29..4f2c8102204 100644 --- a/app/models/concerns/triggerable_hooks.rb +++ b/app/models/concerns/triggerable_hooks.rb @@ -18,7 +18,8 @@ module TriggerableHooks attr_reader :triggerable_hooks def hooks_for(trigger) - return none unless self::TRIGGERS.keys.include?(trigger) + callable_scopes = self::TRIGGERS.keys + [:all] + return none unless callable_scopes.include?(trigger) public_send(trigger) # rubocop:disable GitlabSecurity/PublicSend end |