-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(gitlab): Use new http wrapper for Gitlab platform #6275
refactor(gitlab): Use new http wrapper for Gitlab platform #6275
Conversation
…tlab-http-wrapper
Do we have good example repos to test against? |
Probably, I can just push my existing test repo to new Gitlab remote |
Seems to be working with test repo: https://gitlab.com/zharinov/renovate-test/-/merge_requests |
…tlab-http-wrapper
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some suggesttions. Maybe @zharinov can do the type optimizations in a later pr?
{ | ||
iid: number; | ||
source_branch: string; | ||
title: string; | ||
state: string; | ||
created_at: string; | ||
}[] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We sould extract a type for this
@@ -686,7 +731,7 @@ export async function setBranchStatus({ | |||
|
|||
export async function getIssueList(): Promise<any[]> { | |||
if (!config.issueList) { | |||
const res = await api.get( | |||
const res = await gitlabApi.getJson<{ iid: number; title: string }[]>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create a type for this. maybe we should move all gitlab api types to ./types.ts
const pr = (await api.get(url)).body; | ||
const pr = ( | ||
await gitlabApi.getJson< | ||
Pr & { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should have a helper function for mapping Pr to have proper types, see comments below
…tlab-http-wrapper # Conflicts: # lib/util/http/gitlab.spec.ts
…tlab-http-wrapper # Conflicts: # lib/platform/gitlab/gl-got-wrapper.ts
241ce02
to
2153991
Compare
…tlab-http-wrapper # Conflicts: # lib/platform/gitlab/index.ts
e2be44d
to
e7b9289
Compare
🎉 This PR is included in version 20.11.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Ref: #5865