summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorBram Daams <b.daams@science.ru.nl>2015-10-18 00:11:36 +0200
committerRémy Coutable <remy@rymai.me>2016-02-10 09:40:00 +0100
commitd146d9fd8345afbeb12c2f4184d62213023bc98c (patch)
treed0eb7e32443d4f9c6218c6b04b7d0523f64dca76 /app
parent93d62bb8afb54f5ad134bdcdc2a39e08d7e7c993 (diff)
downloadgitlab-ce-d146d9fd8345afbeb12c2f4184d62213023bc98c.tar.gz
Add assignee data to Issuables' hook_databrammeleman/3047-add-assignee-data-to-isuable-hook-data
Diffstat (limited to 'app')
-rw-r--r--app/models/concerns/issuable.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/models/concerns/issuable.rb b/app/models/concerns/issuable.rb
index 04650a9e67a..cf6aa592e2a 100644
--- a/app/models/concerns/issuable.rb
+++ b/app/models/concerns/issuable.rb
@@ -126,7 +126,7 @@ module Issuable
end
def to_hook_data(user)
- {
+ hook_data = {
object_kind: self.class.name.underscore,
user: user.hook_attrs,
repository: {
@@ -137,6 +137,9 @@ module Issuable
},
object_attributes: hook_attrs
}
+ hook_data.merge!(assignee: assignee.hook_attrs) if assignee
+
+ hook_data
end
def label_names