summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2017-03-17 13:37:32 +0000
committerSean McGivern <sean@mcgivern.me.uk>2017-03-17 13:37:32 +0000
commit1ac6bb553f7d0afc3583ad41a97a4cade918b6c7 (patch)
tree0be1321bfc6cdd67b91c91d46510e4d69446ffa4 /app/models
parentd50034245a7ab7819bc83bb6e2796bbd384a7a8c (diff)
parentf2be76f3e8daac51577dcebf52b8b2852fa62aa2 (diff)
downloadgitlab-ce-1ac6bb553f7d0afc3583ad41a97a4cade918b6c7.tar.gz
Merge branch 'add-labels-to-issue-hook' into 'master'
Added labels to the issue web hook Closes #22313 See merge request !9972
Diffstat (limited to 'app/models')
-rw-r--r--app/models/concerns/issuable.rb1
-rw-r--r--app/models/label.rb4
2 files changed, 5 insertions, 0 deletions
diff --git a/app/models/concerns/issuable.rb b/app/models/concerns/issuable.rb
index 3b2c6a178e7..91f4eb13ecc 100644
--- a/app/models/concerns/issuable.rb
+++ b/app/models/concerns/issuable.rb
@@ -261,6 +261,7 @@ module Issuable
user: user.hook_attrs,
project: project.hook_attrs,
object_attributes: hook_attrs,
+ labels: labels.map(&:hook_attrs),
# DEPRECATED
repository: project.hook_attrs.slice(:name, :url, :description, :homepage)
}
diff --git a/app/models/label.rb b/app/models/label.rb
index f68a8c9cff2..568fa6d44f5 100644
--- a/app/models/label.rb
+++ b/app/models/label.rb
@@ -169,6 +169,10 @@ class Label < ActiveRecord::Base
end
end
+ def hook_attrs
+ attributes
+ end
+
private
def issues_count(user, params = {})