Skip to content

Commit 9c300e3

Browse files
committed
Restore GitLabDSL.api to be GitLabAPI instance
Revert "Ensures that the Gitlab API is exposed properly through the dts" This reverts commit e8d2052. The breakage is between 10.6.5 and 10.6.6 version
1 parent 28d3099 commit 9c300e3

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

Diff for: source/dsl/GitLabDSL.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Please don't have includes in here that aren't inside the DSL folder, or the d.ts/flow defs break
22
// TODO: extract out from BitBucket specifically, or create our own type
3-
import { Gitlab } from "@gitbeaker/node"
3+
import GitLabAPI from "../platforms/gitlab/GitLabAPI"
44
import { RepoMetaData } from "./BitBucketServerDSL"
55

66
// getPlatformReviewDSLRepresentation
@@ -21,7 +21,7 @@ export interface GitLabDSL extends GitLabJSONDSL {
2121
utils: {
2222
fileContents(path: string, repoSlug?: string, ref?: string): Promise<string>
2323
}
24-
api: InstanceType<typeof Gitlab>
24+
api: GitLabAPI
2525
}
2626

2727
// ---

Diff for: source/platforms/GitLab.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -228,5 +228,5 @@ export const gitlabJSONToGitLabDSL = (gl: GitLabDSL, api: GitLabAPI): GitLabDSL
228228
utils: {
229229
fileContents: api.getFileContents,
230230
},
231-
api: api.apiInstance,
231+
api,
232232
})

Diff for: source/platforms/gitlab/GitLabAPI.ts

-4
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,6 @@ class GitLabAPI {
7777
return `${this.projectURL}/merge_requests/${this.prId}`
7878
}
7979

80-
get apiInstance() {
81-
return this.api
82-
}
83-
8480
getUser = async (): Promise<GitLabUserProfile> => {
8581
this.d("getUser")
8682
const user = (await this.api.Users.current()) as GitLabUserProfile

0 commit comments

Comments
 (0)