diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-29 01:05:40 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-09-29 01:05:44 +0300 |
commit | f5897da89ca63facbef54c23cff894f2bbe8e644 (patch) | |
tree | 9671f60e71b3cb78705a211977870fb1c5a4b354 /app/models/concerns/integrations/has_web_hook.rb | |
parent | 10d9a3bf50cca85dd857c5306a34d7a6032580e6 (diff) |
Add latest changes from gitlab-org/security/gitlab@15-4-stable-ee
Diffstat (limited to 'app/models/concerns/integrations/has_web_hook.rb')
-rw-r--r-- | app/models/concerns/integrations/has_web_hook.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/app/models/concerns/integrations/has_web_hook.rb b/app/models/concerns/integrations/has_web_hook.rb index e6ca6cc7938..5fd71f3d72f 100644 --- a/app/models/concerns/integrations/has_web_hook.rb +++ b/app/models/concerns/integrations/has_web_hook.rb @@ -14,6 +14,11 @@ module Integrations raise NotImplementedError end + # Return the url variables to be used for the webhook. + def url_variables + raise NotImplementedError + end + # Return whether the webhook should use SSL verification. def hook_ssl_verification if respond_to?(:enable_ssl_verification) @@ -26,7 +31,11 @@ module Integrations # Create or update the webhook, raising an exception if it cannot be saved. def update_web_hook! hook = service_hook || build_service_hook - hook.url = hook_url if hook.url != hook_url # avoid reencryption + + # Avoid reencryption + hook.url = hook_url if hook.url != hook_url + hook.url_variables = url_variables if hook.url_variables != url_variables + hook.enable_ssl_verification = hook_ssl_verification hook.save! if hook.changed? hook |