Skip to content

refactor: Use new ApiClient and deprecate old GitLabClient

Paul Slaughter requested to merge ps-refactor-to-new-api-client into main

Description

  • This new client uses objects instead of methods to represent the endpoints
  • This is needed to unify the GitLab Workflow Extension

Files of interest:

  • endpoints.ts this encapsulates all of the DeprecatedGitLabClient endpoints and shows how the endpointBuilder works.
  • DeprecatedGitLabClient.ts which is the old GitLabClient that now accepts the generic ApiClient. Look at the implementation of it's methods for how the endpoint objects can be easily used with the DefaultGitLabClient that implements the ApiClient interface.
  • Look at the next MR for how this plays out with the code_suggestions/tokens endpoint.

Screenshots

TBD

Edited by Paul Slaughter

Merge request reports