diff --git a/source/dsl/GitLabDSL.ts b/source/dsl/GitLabDSL.ts index cb264c1b8..0bddef3c7 100644 --- a/source/dsl/GitLabDSL.ts +++ b/source/dsl/GitLabDSL.ts @@ -1,6 +1,6 @@ // Please don't have includes in here that aren't inside the DSL folder, or the d.ts/flow defs break // TODO: extract out from BitBucket specifically, or create our own type -import { Gitlab } from "@gitbeaker/node" +import GitLabAPI from "../platforms/gitlab/GitLabAPI" import { RepoMetaData } from "./BitBucketServerDSL" // getPlatformReviewDSLRepresentation @@ -21,7 +21,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 21316a582..7484858bf 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 f070028c4..7d66d142f 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