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
|
14. `create_merge_request_thread` - Create a new thread on a merge request
|
||||||
15. `mr_discussions` - List discussion items for 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
|
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
|
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
|
19. `get_issue` - Get details of a specific issue in a GitLab project
|
||||||
20. `update_issue` - Update an 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
|
GitLabDiscussionNoteSchema, // Added
|
||||||
GitLabDiscussionSchema,
|
GitLabDiscussionSchema,
|
||||||
UpdateMergeRequestNoteSchema, // Added
|
UpdateMergeRequestNoteSchema, // Added
|
||||||
AddMergeRequestThreadNoteSchema, // Added
|
CreateMergeRequestNoteSchema, // Added
|
||||||
ListMergeRequestDiscussionsSchema,
|
ListMergeRequestDiscussionsSchema,
|
||||||
type GitLabFork,
|
type GitLabFork,
|
||||||
type GitLabReference,
|
type GitLabReference,
|
||||||
@ -282,9 +282,9 @@ const allTools = [
|
|||||||
inputSchema: zodToJsonSchema(UpdateMergeRequestNoteSchema),
|
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",
|
description: "Add a new note to an existing merge request thread",
|
||||||
inputSchema: zodToJsonSchema(AddMergeRequestThreadNoteSchema),
|
inputSchema: zodToJsonSchema(CreateMergeRequestNoteSchema),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "list_issues",
|
name: "list_issues",
|
||||||
@ -1077,7 +1077,7 @@ async function updateMergeRequestNote(
|
|||||||
* @param {string} [createdAt] - The creation date of the note (ISO 8601 format)
|
* @param {string} [createdAt] - The creation date of the note (ISO 8601 format)
|
||||||
* @returns {Promise<GitLabDiscussionNote>} The created note
|
* @returns {Promise<GitLabDiscussionNote>} The created note
|
||||||
*/
|
*/
|
||||||
async function addMergeRequestThreadNote(
|
async function createMergeRequestNote(
|
||||||
projectId: string,
|
projectId: string,
|
||||||
mergeRequestIid: number,
|
mergeRequestIid: number,
|
||||||
discussionId: string,
|
discussionId: string,
|
||||||
@ -2385,11 +2385,11 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
case "add_merge_request_thread_note": {
|
case "create_merge_request_note": {
|
||||||
const args = AddMergeRequestThreadNoteSchema.parse(
|
const args = CreateMergeRequestNoteSchema.parse(
|
||||||
request.params.arguments
|
request.params.arguments
|
||||||
);
|
);
|
||||||
const note = await addMergeRequestThreadNote(
|
const note = await createMergeRequestNote(
|
||||||
args.project_id,
|
args.project_id,
|
||||||
args.merge_request_iid,
|
args.merge_request_iid,
|
||||||
args.discussion_id,
|
args.discussion_id,
|
||||||
|
@ -480,7 +480,7 @@ export const UpdateMergeRequestNoteSchema = ProjectParamsSchema.extend({
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Input schema for adding a note to an existing merge request discussion
|
// 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"),
|
merge_request_iid: z.number().describe("The IID of a merge request"),
|
||||||
discussion_id: z.string().describe("The ID of a thread"),
|
discussion_id: z.string().describe("The ID of a thread"),
|
||||||
body: z.string().describe("The content of the note or reply"),
|
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 GetRepositoryTreeOptions = z.infer<typeof GetRepositoryTreeSchema>;
|
||||||
export type MergeRequestThreadPosition = z.infer<typeof MergeRequestThreadPositionSchema>;
|
export type MergeRequestThreadPosition = z.infer<typeof MergeRequestThreadPositionSchema>;
|
||||||
export type CreateMergeRequestThreadOptions = z.infer<typeof CreateMergeRequestThreadSchema>;
|
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