summaryrefslogtreecommitdiff
path: root/lib/api/helpers.rb
diff options
context:
space:
mode:
authorOswaldo Ferreira <oswaldo@gitlab.com>2017-02-23 17:49:37 -0300
committerOswaldo Ferreira <oswaldo@gitlab.com>2017-02-23 20:52:38 -0300
commit86cf4cd68b950259e40c80694a08a542a9a9a10b (patch)
tree730db34628498abe30624e8eeb2d450178f50d7e /lib/api/helpers.rb
parentdaf617e4e1c32b22af35575b13560d941aa64171 (diff)
downloadgitlab-ce-22600-related-resources-uris.tar.gz
Pass request properly to grape endpoints using Issue entity22600-related-resources-uris
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r--lib/api/helpers.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb
index d0efa7b993b..68b93f306e2 100644
--- a/lib/api/helpers.rb
+++ b/lib/api/helpers.rb
@@ -376,6 +376,15 @@ module API
header(*Gitlab::Workhorse.send_git_archive(repository, ref: ref, format: format))
end
+ # TODO: Please, remove this when V3 API is gone.
+ def v3_issue_entity(project)
+ if project.has_external_issue_tracker?
+ Entities::ExternalIssue
+ else
+ ::API::V3::Entities::Issue
+ end
+ end
+
def issue_entity(project)
if project.has_external_issue_tracker?
Entities::ExternalIssue