Closed MR from default branch shows up in the Web IDE

Summary

Reference to closed MR from default branch shows up in the Web IDE

This was noticed in the www-gitlab-com project when using the Web IDE and reproduced here

Screen_Shot_2019-10-10_at_13.49.17

Steps to reproduce

  • Create a new project projectX
  • Establish repository by creating a README file
  • Create a new branch from master, test-branch
  • Create a new Merge Request MR1 with the source branch of master targeting test-branch
  • Close MR1
  • Navigate to projectX homepage
  • Click link to Edit README in Web IDE

Example Project

  • https://gitlab.com/-/ide/project/issue-reproduce/web-ide-master-mr/edit/master/-/

www-gitlab-com:

  • https://gitlab.com/-/ide/project/gitlab-com/www-gitlab-com/edit/master/-/

What is the current bug behavior?

A reference to the closed MR targeting master is visible whenever you use the Web IDE

What is the expected correct behavior?

The reference should not be there

Output of checks

reproduced on GitLab.com 12.3.5

Assignee Loading
Time tracking Loading