Skip to content

Chore: Upgrade GitBeaker dependency to 43.8.0#1510

Draft
glensc wants to merge 3 commits into
danger:mainfrom
glensc:update-gitbeaker
Draft

Chore: Upgrade GitBeaker dependency to 43.8.0#1510
glensc wants to merge 3 commits into
danger:mainfrom
glensc:update-gitbeaker

Conversation

@glensc
Copy link
Copy Markdown
Contributor

@glensc glensc commented Apr 12, 2026

glensc added 2 commits April 12, 2026 14:40
- Fix TS2741 in GitLab.ts when updated notes lose the required `type` field
- Fix TS2322 in GitLab tests where discussion mocks pass MergeRequestNoteSchema values
@glensc glensc marked this pull request as draft April 12, 2026 11:45
@glensc
Copy link
Copy Markdown
Contributor Author

glensc commented May 4, 2026

I don't know why CI fails. Help appreciated.

@fbartho
Copy link
Copy Markdown
Member

fbartho commented May 4, 2026

@glensc I'm not sure what the question is; it looks like many of the _gitlab_api.test.ts test cases are throwing the same error: "TypeError: Only absolute URLs are supported"

Tracing the first test case:

it("getUser returns the current user profile id", async () => {
// To re-record this you need to provide a valid DANGER_GITLAB_API_TOKEN
const { nockDone } = await nockBack("getUser.json", { afterRecord: sanitizeUserResponse })
const result = await api.getUser()
nockDone()
const { response } = loadFixture("getUser")
expect(result).toEqual(response)
})

This calls through the platform to the GitLab adapter:

getUser = async (): Promise<Types.ExpandedUserSchema> => {
this.d("getUser")
const user = (await this.api.Users.showCurrentUser()) as Types.ExpandedUserSchema
this.d("getUser", user)
return user
}

So I suspect the gitlab API (or more likely gitbreaker itself) is throwing an error at this.api.Users.showCurrentUser()

What do you think?

@fbartho
Copy link
Copy Markdown
Member

fbartho commented May 4, 2026

Alternatively, the issue is with nock's integration into the codebase. That is a dependency that is only used by the GitLab API.

Custom testing tools for test infrastructure only used by a single platform (that is experiencing errors) makes me suspicious. Generic testing tools might not expect the DangerJS runtime.

Was nock necessary? Don't we have other tools in the repo that accomplish the same objective?

@glensc
Copy link
Copy Markdown
Contributor Author

glensc commented May 6, 2026

"I don't know" was perhaps too short a message.

I tried to update nock integration, but my changes had no effect (sorry, I don't have them around). also tried to compare git diffs between breaking versions (38..39) and found nothing obvious.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants