Commit a65ae9b1 authored by Stan Hu's avatar Stan Hu

Fix related merge requests not working with relative URL root

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.

CE port: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/27475
parent dfb1cc61
......@@ -87,7 +87,7 @@
%h3.card-title.mt-0.mb-0.h5
Related issues
#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) } }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment