Skip to content

Commit

Permalink
Restore GitLabDSL.api to be GitLabAPI instance
Browse files Browse the repository at this point in the history
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
  • Loading branch information
glensc committed Feb 15, 2023
1 parent f40b0de commit e01ecaa
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
4 changes: 2 additions & 2 deletions source/dsl/GitLabDSL.ts
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -20,7 +20,7 @@ export interface GitLabDSL extends GitLabJSONDSL {
utils: {
fileContents(path: string, repoSlug?: string, ref?: string): Promise<string>
}
api: InstanceType<typeof Gitlab>
api: GitLabAPI
}

// ---
Expand Down
2 changes: 1 addition & 1 deletion source/platforms/GitLab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,5 +228,5 @@ export const gitlabJSONToGitLabDSL = (gl: GitLabDSL, api: GitLabAPI): GitLabDSL
utils: {
fileContents: api.getFileContents,
},
api: api.apiInstance,
api,
})
4 changes: 0 additions & 4 deletions source/platforms/gitlab/GitLabAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,6 @@ class GitLabAPI {
return `${this.projectURL}/merge_requests/${this.prId}`
}

get apiInstance() {
return this.api
}

getUser = async (): Promise<GitLabUserProfile> => {
this.d("getUser")
const user = (await this.api.Users.current()) as GitLabUserProfile
Expand Down

0 comments on commit e01ecaa

Please sign in to comment.