diff options
author | Marin Jankovski <maxlazio@gmail.com> | 2015-02-23 12:59:49 -0800 |
---|---|---|
committer | Marin Jankovski <maxlazio@gmail.com> | 2015-02-23 16:40:55 -0800 |
commit | 6327dd0e9d25efad4f83b1dfe5d730eb0a4cff2f (patch) | |
tree | d2d38342450cbee71ffdcb0c0d4f29ba17990f32 /app | |
parent | bcc8dbd0659b89a20f6cbd955c7022ea09dd0172 (diff) | |
download | gitlab-ce-6327dd0e9d25efad4f83b1dfe5d730eb0a4cff2f.tar.gz |
Fix links to issues if instance is using relative urls.
Diffstat (limited to 'app')
-rw-r--r-- | app/models/project_services/gitlab_issue_tracker_service.rb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/app/models/project_services/gitlab_issue_tracker_service.rb b/app/models/project_services/gitlab_issue_tracker_service.rb index b1eab24df19..dca05e9f78d 100644 --- a/app/models/project_services/gitlab_issue_tracker_service.rb +++ b/app/models/project_services/gitlab_issue_tracker_service.rb @@ -27,14 +27,20 @@ class GitlabIssueTrackerService < IssueTrackerService end def project_url - project_issues_path(project) + "#{gitlab_url}#{project_issues_path(project)}" end def new_issue_url - new_project_issue_path project_id: project + "#{gitlab_url}#{new_project_issue_path(project_id: project)}" end def issue_url(iid) - "#{Gitlab.config.gitlab.url}#{project_issue_path(project_id: project, id: iid)}" + "#{gitlab_url}#{project_issue_path(project_id: project, id: iid)}" + end + + private + + def gitlab_url + Gitlab.config.gitlab.relative_url_root.chomp("/") if Gitlab.config.gitlab.relative_url_root end end |