Issue button in status bar caches URL between switching of branches

Steps to reproduce

  • Checkout to a branch for which an MR exists on GitLab
  • Notice how status shows pipeline status for the branch as well as related issue;

image

  • Clicking on Issue opens it in the browser.
  • Checkout to a branch for which there is no MR on GitLab and wait for status bar to refresh.
  • Notice how the button now says No issue;

image

  • Clicking on the button still takes user to URL of issue from previously checked out branch.

Expected behaviour

User should see standard toast message saying when there is no closing issue present for current branch.

Actual behaviour

Issue URL is cached and is not flushed when branch is changed.

Notes

This doesn't happen for MR button as when branches are switched, MR button doesn't cache previous URLs.