summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-04-17 21:12:18 -0700
committerStan Hu <stanhu@gmail.com>2019-04-17 21:14:17 -0700
commit31b4e54e86fd672d60596097b68bcba61a6f7686 (patch)
tree01700ff0a91b9191cbd0d7df13f8faa577b40a57
parentce02daea08c4cc7bc5e65e56f9b3d744a2e1faa6 (diff)
downloadgitlab-ce-sh-fix-related-merge-request-api-paths.tar.gz
Fix related merge requests not working with relative URL rootsh-fix-related-merge-request-api-paths
When GitLab is configured with a relative URL root (e.g. /gitlab), an error appeared, "Something went wrong while fetching related merge requests." This change ensures the relative URL is included.
-rw-r--r--app/views/projects/issues/show.html.haml2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/projects/issues/show.html.haml b/app/views/projects/issues/show.html.haml
index 2c95ac6dbb3..4bf1d8702af 100644
--- a/app/views/projects/issues/show.html.haml
+++ b/app/views/projects/issues/show.html.haml
@@ -77,7 +77,7 @@
= edited_time_ago_with_tooltip(@issue, placement: 'bottom', html_class: 'issue-edited-ago js-issue-edited-ago')
- #js-related-merge-requests{ data: { endpoint: api_v4_projects_issues_related_merge_requests_path(id: @project.id, issue_iid: @issue.iid), project_namespace: @project.namespace.path, project_path: @project.path } }
+ #js-related-merge-requests{ data: { endpoint: expose_url(api_v4_projects_issues_related_merge_requests_path(id: @project.id, issue_iid: @issue.iid)), project_namespace: @project.namespace.path, project_path: @project.path } }
- if can?(current_user, :download_code, @project)
#related-branches{ data: { url: related_branches_project_issue_path(@project, @issue) } }