refactor: rename add_merge_request_thread_note to create_merge_request_note for consistency
This commit is contained in:
@ -58,7 +58,7 @@ When using with the Claude App, you need to set up your API key and URLs directl
|
||||
14. `create_merge_request_thread` - Create a new thread on a merge request
|
||||
15. `mr_discussions` - List discussion items for a merge request
|
||||
16. `update_merge_request_note` - Modify an existing merge request thread note
|
||||
17. `add_merge_request_thread_note` - Add a new note to an existing merge request thread
|
||||
17. `create_merge_request_note` - Add a new note to an existing merge request thread
|
||||
18. `list_issues` - List issues in a GitLab project with filtering options
|
||||
19. `get_issue` - Get details of a specific issue in a GitLab project
|
||||
20. `update_issue` - Update an issue in a GitLab project
|
||||
|
14
index.ts
14
index.ts
@ -87,7 +87,7 @@ import {
|
||||
GitLabDiscussionNoteSchema, // Added
|
||||
GitLabDiscussionSchema,
|
||||
UpdateMergeRequestNoteSchema, // Added
|
||||
AddMergeRequestThreadNoteSchema, // Added
|
||||
CreateMergeRequestNoteSchema, // Added
|
||||
ListMergeRequestDiscussionsSchema,
|
||||
type GitLabFork,
|
||||
type GitLabReference,
|
||||
@ -282,9 +282,9 @@ const allTools = [
|
||||
inputSchema: zodToJsonSchema(UpdateMergeRequestNoteSchema),
|
||||
},
|
||||
{
|
||||
name: "add_merge_request_thread_note",
|
||||
name: "create_merge_request_note",
|
||||
description: "Add a new note to an existing merge request thread",
|
||||
inputSchema: zodToJsonSchema(AddMergeRequestThreadNoteSchema),
|
||||
inputSchema: zodToJsonSchema(CreateMergeRequestNoteSchema),
|
||||
},
|
||||
{
|
||||
name: "list_issues",
|
||||
@ -1077,7 +1077,7 @@ async function updateMergeRequestNote(
|
||||
* @param {string} [createdAt] - The creation date of the note (ISO 8601 format)
|
||||
* @returns {Promise<GitLabDiscussionNote>} The created note
|
||||
*/
|
||||
async function addMergeRequestThreadNote(
|
||||
async function createMergeRequestNote(
|
||||
projectId: string,
|
||||
mergeRequestIid: number,
|
||||
discussionId: string,
|
||||
@ -2385,11 +2385,11 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
||||
};
|
||||
}
|
||||
|
||||
case "add_merge_request_thread_note": {
|
||||
const args = AddMergeRequestThreadNoteSchema.parse(
|
||||
case "create_merge_request_note": {
|
||||
const args = CreateMergeRequestNoteSchema.parse(
|
||||
request.params.arguments
|
||||
);
|
||||
const note = await addMergeRequestThreadNote(
|
||||
const note = await createMergeRequestNote(
|
||||
args.project_id,
|
||||
args.merge_request_iid,
|
||||
args.discussion_id,
|
||||
|
@ -480,7 +480,7 @@ export const UpdateMergeRequestNoteSchema = ProjectParamsSchema.extend({
|
||||
});
|
||||
|
||||
// Input schema for adding a note to an existing merge request discussion
|
||||
export const AddMergeRequestThreadNoteSchema = ProjectParamsSchema.extend({
|
||||
export const CreateMergeRequestNoteSchema = 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"),
|
||||
@ -1087,4 +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>;
|
||||
export type CreateMergeRequestNoteOptions = z.infer<typeof CreateMergeRequestNoteSchema>;
|
||||
|
Reference in New Issue
Block a user