refactor: use credentials from tokenService
This refactoring reflects an insight that GitLab instanceUrl and personal access token are pair that exists in the app together.
So far we were passing the instanceUrl
through as an argument and then later on, the logic called a global tokenService
to get the token for the instanceUrl
.
The problem is that the tokenService.getToken(instanceUrl)
can return undefined
but in many (if not all cases) we knew that the token exists.
This MR extends the usage of the Credentials
interface, which is a pair of instanceURl
and token
.
Related to #515 (closed)
Edited by Tomas Vik