summaryrefslogtreecommitdiff
path: root/lib/api/entities.rb
diff options
context:
space:
mode:
authorWinnie Hellmann <winnie@gitlab.com>2019-09-04 14:44:37 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2019-09-04 14:44:37 +0000
commit61515737a5a0e95891e169b20e9492553c11c620 (patch)
tree971733b1e09ceb650ddfa0966a40e4c47cd98fdb /lib/api/entities.rb
parent2adc4ccf4dedcc33207658ec55873aee38598b6e (diff)
downloadgitlab-ce-61515737a5a0e95891e169b20e9492553c11c620.tar.gz
Add epic_iid to issue API entity
(cherry picked from commit 0bf7fecdee5a200eeb4f27b4888a57ceee63bde9)
Diffstat (limited to 'lib/api/entities.rb')
-rw-r--r--lib/api/entities.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb
index ba58e125568..f7cd6d35854 100644
--- a/lib/api/entities.rb
+++ b/lib/api/entities.rb
@@ -978,7 +978,9 @@ module API
expose :created_at
def todo_target_class(target_type)
- ::API::Entities.const_get(target_type)
+ # false as second argument prevents looking up in module hierarchy
+ # see also https://gitlab.com/gitlab-org/gitlab-ce/issues/59719
+ ::API::Entities.const_get(target_type, false)
end
end
@@ -1731,6 +1733,7 @@ API::Entities.prepend_if_ee('EE::API::Entities::Entities')
::API::Entities::Group.prepend_if_ee('EE::API::Entities::Group', with_descendants: true)
::API::Entities::GroupDetail.prepend_if_ee('EE::API::Entities::GroupDetail')
::API::Entities::IssueBasic.prepend_if_ee('EE::API::Entities::IssueBasic', with_descendants: true)
+::API::Entities::Issue.prepend_if_ee('EE::API::Entities::Issue')
::API::Entities::List.prepend_if_ee('EE::API::Entities::List')
::API::Entities::MergeRequestBasic.prepend_if_ee('EE::API::Entities::MergeRequestBasic', with_descendants: true)
::API::Entities::Namespace.prepend_if_ee('EE::API::Entities::Namespace')