TS migration 2: migrate gitlab_service

Problem to solve

This is a followup issue for #219 (closed). gitlab_service.js has got 670 LOC and because we need to convert a JS file to TS in one go, we are creating a separate issue just for this conversion. The rest of the extension will be converted in the spirit "you touch it, you convert it".

Proposal

We are going to migrate the gitlab_servic.js to TypeScript. This service is providing the rest of the extension with information from the GitLab instance.

graph TD
A[rest of the extension] --> B
D[status_bar] -->
B[gitlab_service] -->
C[git_service.ts]
B --> D

Further details

In scope

  • break the cyclic dependency so that gitlab_service isn't dependent on status_bar
  • write 3 - 5 integration tests touching the GitLab service
  • define types for token_service and gitlab_project_input (or migrate them to TS if it's trivial)
  • rewrite the gitlab_service.js to TypeScript
  • manual testing afterwards

Out of scope

  • rewriting any other code to TypeScript
  • extensive test coverage with unit test (would take too long)
  • redesigning the gitlab_service.js (for easy review, the code branches and interfaces shouldn't change too much)

Links / references