diff options
author | Robert Speicher <robert@gitlab.com> | 2016-06-12 19:26:29 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2016-06-12 19:26:29 +0000 |
commit | 8d243f9bdacea1909bf503eb715bd437c3b48aa7 (patch) | |
tree | 122885cdf932838647df64a240185e1f1ff8b98c /lib/api/helpers.rb | |
parent | 714a60b45c07fe1fd241863230422d2f76e4bcb6 (diff) | |
parent | a85dde9182f177cc2fdabd90ccdad870bf4d84c3 (diff) | |
download | gitlab-ce-8d243f9bdacea1909bf503eb715bd437c3b48aa7.tar.gz |
Merge branch 'fix-closes-issues-error-500' into 'master'
Fix Error 500 when using closes_issues API with an external issue tracker
Closes #18484
See merge request !4608
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r-- | lib/api/helpers.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb index e1d3bbcc02d..de5959e3aae 100644 --- a/lib/api/helpers.rb +++ b/lib/api/helpers.rb @@ -418,5 +418,13 @@ module API def send_git_archive(repository, ref:, format:) header(*Gitlab::Workhorse.send_git_archive(repository, ref: ref, format: format)) end + + def issue_entity(project) + if project.has_external_issue_tracker? + Entities::ExternalIssue + else + Entities::Issue + end + end end end |