diff --git a/source/dsl/GitLabDSL.ts b/source/dsl/GitLabDSL.ts index e517efb4b..68af91210 100644 --- a/source/dsl/GitLabDSL.ts +++ b/source/dsl/GitLabDSL.ts @@ -1,5 +1,5 @@ // Please don't have includes in here that aren't inside the DSL folder, or the d.ts/flow defs break -import { Gitlab } from "@gitbeaker/node" +import GitLabAPI from "../platforms/gitlab/GitLabAPI" import { RepoMetaData } from "./RepoMetaData" // getPlatformReviewDSLRepresentation @@ -20,7 +20,7 @@ export interface GitLabDSL extends GitLabJSONDSL { utils: { fileContents(path: string, repoSlug?: string, ref?: string): Promise } - api: InstanceType + api: GitLabAPI } // --- diff --git a/source/platforms/GitLab.ts b/source/platforms/GitLab.ts index 7c9ebfecf..1ef74c28a 100644 --- a/source/platforms/GitLab.ts +++ b/source/platforms/GitLab.ts @@ -228,5 +228,5 @@ export const gitlabJSONToGitLabDSL = (gl: GitLabDSL, api: GitLabAPI): GitLabDSL utils: { fileContents: api.getFileContents, }, - api: api.apiInstance, + api, }) diff --git a/source/platforms/gitlab/GitLabAPI.ts b/source/platforms/gitlab/GitLabAPI.ts index b6d441c90..d47438e00 100644 --- a/source/platforms/gitlab/GitLabAPI.ts +++ b/source/platforms/gitlab/GitLabAPI.ts @@ -77,10 +77,6 @@ class GitLabAPI { return `${this.projectURL}/merge_requests/${this.prId}` } - get apiInstance() { - return this.api - } - getUser = async (): Promise => { this.d("getUser") const user = (await this.api.Users.current()) as GitLabUserProfile