Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
44d8d11b4a | |||
622c112f7f |
9
index.ts
9
index.ts
@ -907,14 +907,15 @@ async function listIssues(
|
||||
// Add all query parameters
|
||||
Object.entries(options).forEach(([key, value]) => {
|
||||
if (value !== undefined) {
|
||||
if (key === "labels" ) {
|
||||
const keys = ["labels", "assignee_username"];
|
||||
if ( keys.includes(key)) {
|
||||
if (Array.isArray(value)) {
|
||||
// Handle array of labels
|
||||
value.forEach(label => {
|
||||
url.searchParams.append("labels[]", label.toString());
|
||||
url.searchParams.append(`${key}[]`, label.toString());
|
||||
});
|
||||
} else {
|
||||
url.searchParams.append("labels[]", value.toString());
|
||||
url.searchParams.append(`${key}[]`, value.toString());
|
||||
}
|
||||
} else {
|
||||
url.searchParams.append(key, value.toString());
|
||||
@ -1199,6 +1200,8 @@ async function createMergeRequest(
|
||||
labels: options.labels?.join(","),
|
||||
allow_collaboration: options.allow_collaboration,
|
||||
draft: options.draft,
|
||||
remove_source_branch: options.remove_source_branch,
|
||||
squash: options.squash,
|
||||
}),
|
||||
});
|
||||
|
||||
|
@ -467,6 +467,8 @@ export const CreateMergeRequestOptionsSchema = z.object({
|
||||
labels: z.array(z.string()).optional(),
|
||||
allow_collaboration: z.boolean().optional(), // Changed from maintainer_can_modify to match GitLab API
|
||||
draft: z.boolean().optional(),
|
||||
remove_source_branch: z.boolean().optional().describe("Flag indicating if a merge request should remove the source branch when merging."),
|
||||
squash: z.boolean().optional().describe("If true, squash all commits into a single commit on merge.")
|
||||
});
|
||||
|
||||
export const GitLabDiffSchema = z.object({
|
||||
|
Reference in New Issue
Block a user