Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-07-19 17:16:28 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-07-19 17:16:28 +0300
commite4384360a16dd9a19d4d2d25d0ef1f2b862ed2a6 (patch)
tree2fcdfa7dcdb9db8f5208b2562f4b4e803d671243 /lib/gitlab/hook_data
parentffda4e7bcac36987f936b4ba515995a6698698f0 (diff)
Add latest changes from gitlab-org/gitlab@16-2-stable-eev16.2.0-rc42
Diffstat (limited to 'lib/gitlab/hook_data')
-rw-r--r--lib/gitlab/hook_data/emoji_builder.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/gitlab/hook_data/emoji_builder.rb b/lib/gitlab/hook_data/emoji_builder.rb
new file mode 100644
index 00000000000..673eb516e43
--- /dev/null
+++ b/lib/gitlab/hook_data/emoji_builder.rb
@@ -0,0 +1,26 @@
+# frozen_string_literal: true
+
+module Gitlab
+ module HookData
+ class EmojiBuilder < BaseBuilder
+ SAFE_HOOK_ATTRIBUTES = %i[
+ user_id
+ created_at
+ id
+ name
+ awardable_type
+ awardable_id
+ updated_at
+ ].freeze
+
+ alias_method :award_emoji, :object
+
+ def build
+ award_emoji
+ .attributes
+ .with_indifferent_access
+ .slice(*SAFE_HOOK_ATTRIBUTES)
+ end
+ end
+ end
+end