Job page link to merge request links to source, rather than target, project
Summary
Given a merge request from a fork of a project, the jobs page gives the wrong URL to the merge request, e.g.:
- https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/12859
- Pick a pipeline, you are linked to e.g., https://gitlab.com/nick.thomas/gitlab-ce/pipelines/9865140
- Pick a job, you are linked to e.g., https://gitlab.com/nick.thomas/gitlab-ce/-/jobs/22493205
- Click the merge request, you are linked to https://gitlab.com/nick.thomas/gitlab-ce/merge_requests/12859
Steps to reproduce
Open an issue in a fork project, create a new pipeline, visit the job, try to go to MR from job page
What is the current bug behavior?
Linked to a 404 URL (source project)
What is the expected correct behavior?
Linked to the correct URL (target project)