Migrate MR and Pipeline status bar items to WebIDE
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Work on this issue](https://contributors.gitlab.com/manage-issue?action=work&projectId=278964&issueIid=415189) - [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=415189) </details> <!--IssueSummary end--> This issue si about migrating the MR and pipeline status bar items to `common` code ![image](/uploads/1c3135138f92d5dfc99e1c7a8c58fc48/image.png) ## Techincal details The [`CurrentBranchReferesher`](https://gitlab.com/gitlab-org/gitlab-vscode-extension/blob/0588d5919a097d84466de0743fb8b016901fc34f/src/current_branch_refresher.ts#L70) is the data source for the "For Current Branch" panel: ![image](/uploads/703bd5c634365849c2edf1a999cdee73/image.png) It is now dependent on desktop-specific logic. We need to abstract all the dependencies to the `GitLabPlatform`, namely: - We need to expose the current branch in the platform - In desktop, we [read it from Git](https://gitlab.com/gitlab-org/gitlab-vscode-extension/blob/0588d5919a097d84466de0743fb8b016901fc34f/src/current_branch_refresher.ts#L143-162) - In WebIDE, it's [coming from the config](https://gitlab.com/gitlab-org/gitlab-web-ide/blob/346fd036b76d15f8dc90b3e55947a7f27218ce0c/packages/web-ide-types/src/config.ts#L65-71) - the tricky part is that (AFAIKT) if we open MR in the WebIDE, the `ref` config is empty (**needs verification**). That means we would have to get the branch from an MR - another tricky part is that the WebIDE currently has a bug, and you can't open tags. The tags are handled differently in desktop Workflow - All the GitLab service API calls (e.g. [getting pipeline and MR](https://gitlab.com/gitlab-org/gitlab-vscode-extension/blob/0588d5919a097d84466de0743fb8b016901fc34f/src/current_branch_refresher.ts#L146)) must be changed to use the new [`fetchFromApi` method](https://gitlab.com/gitlab-org/gitlab-vscode-extension/blob/0588d5919a097d84466de0743fb8b016901fc34f/src/code_suggestions/code_suggestions_token_manager.ts#L40) ## Progress: @ealcantara and I were pairing on abstracting the API calls.
issue