Skip to content

fix: matching instance URL with token is too strict

This MR fixes issues where we couldn't retrieve a personal access token for an instance because of the instance URL having a trailing slash.

  • We store the tokens in a map where key is the instance URL and value is the token.
  • User configures GitLab instance for each workspace using the gitlab.instanceUrl configuration.

If only one of these instance URLs contained a trailing slash, then we couldn't find the token and we showed a warning like:

warning


This MR avoids the issue by always removing the trailing slash when storing/retrieving tokens.

The MR doesn't fix the problem for existing tokens, but it fixes it for every newly added token. This seemed acceptable to me because presumably users who saw the error message already fixed the issue.

Related to #81 (closed)

Edited by Tomas Vik (OOO back on 2024-07-02)

Merge request reports