diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-21 06:08:34 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-06-21 06:08:34 +0300 |
commit | 9c1df7bcf10e362442057b1df43a753b621d85ee (patch) | |
tree | 593887914bd382186b016387d6dbde6c21c03d08 /app/serializers | |
parent | 92ea86691a2a6b3df4b36c7ff00001410303a701 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/integrations/event_entity.rb | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/app/serializers/integrations/event_entity.rb b/app/serializers/integrations/event_entity.rb index 170f660f334..f603c0e035e 100644 --- a/app/serializers/integrations/event_entity.rb +++ b/app/serializers/integrations/event_entity.rb @@ -18,12 +18,12 @@ module Integrations IntegrationsHelper.integration_event_description(integration, event) end - expose :field, if: ->(_, _) { event_field } do + expose :field, if: ->(_, _) { integration.try(:configurable_channels?) } do expose :name do |event| - event_field[:name] + integration.event_channel_name(event) end expose :value do |event| - integration.public_send(event_field[:name]) # rubocop:disable GitlabSecurity/PublicSend + integration.get_channel_field(event) end end @@ -35,10 +35,6 @@ module Integrations IntegrationsHelper.integration_event_field_name(event) end - def event_field - @event_field ||= integration.event_field(event) - end - def integration request.integration end |