feat: Implement add_merge_request_thread_note function for adding notes to existing MR threads

This commit is contained in:
Nicholas Crum
2025-05-13 16:20:21 -06:00
parent 026dd58887
commit 3f2b35535e
3 changed files with 98 additions and 25 deletions

View File

@ -479,6 +479,14 @@ export const UpdateMergeRequestNoteSchema = ProjectParamsSchema.extend({
resolved: z.boolean().optional().describe("Resolve or unresolve the note"), // Optional based on API docs
});
// Input schema for adding a note to an existing merge request discussion
export const AddMergeRequestThreadNoteSchema = ProjectParamsSchema.extend({
merge_request_iid: z.number().describe("The IID of a merge request"),
discussion_id: z.string().describe("The ID of a thread"),
body: z.string().describe("The content of the note or reply"),
created_at: z.string().optional().describe("Date the note was created at (ISO 8601 format)"),
});
// API Operation Parameter Schemas
export const CreateOrUpdateFileSchema = ProjectParamsSchema.extend({
@ -1079,3 +1087,4 @@ export type GitLabTreeItem = z.infer<typeof GitLabTreeItemSchema>;
export type GetRepositoryTreeOptions = z.infer<typeof GetRepositoryTreeSchema>;
export type MergeRequestThreadPosition = z.infer<typeof MergeRequestThreadPositionSchema>;
export type CreateMergeRequestThreadOptions = z.infer<typeof CreateMergeRequestThreadSchema>;
export type AddMergeRequestThreadNoteOptions = z.infer<typeof AddMergeRequestThreadNoteSchema>;