update_pull_request_comment
Modifies a comment on a pull request in Backlog by specifying the project, repository, pull request number, comment ID, and updated content. Ensures accurate and timely communication in code reviews.
Instructions
Updates a comment on a pull request
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| commentId | Yes | Comment ID | |
| content | Yes | Comment content | |
| number | Yes | Pull request number | |
| projectIdOrKey | Yes | Project ID or project key | |
| repoIdOrName | Yes | Repository ID or name |
Implementation Reference
- The asynchronous handler function that resolves the project ID or key, repository ID or name, and calls the Backlog API to patch (update) the pull request comment.handler: async ({ projectId, projectKey, repoId, repoName, number, commentId, content, }) => { const result = resolveIdOrKey( 'project', { id: projectId, key: projectKey }, t ); if (!result.ok) { throw result.error; } const repoResult = resolveIdOrName( 'repository', { id: repoId, name: repoName }, t ); if (!repoResult.ok) { throw repoResult.error; } return backlog.patchPullRequestComments( result.value, String(repoResult.value), number, commentId, { content } ); },
- Zod schema definition for the input parameters of the update_pull_request_comment tool, including optional project/repo identifiers and required PR number, comment ID, and content.const updatePullRequestCommentSchema = buildToolSchema((t) => ({ projectId: z .number() .optional() .describe( t( 'TOOL_UPDATE_PULL_REQUEST_COMMENT_PROJECT_ID', 'The numeric ID of the project (e.g., 12345)' ) ), projectKey: z .string() .optional() .describe( t( 'TOOL_UPDATE_PULL_REQUEST_COMMENT_PROJECT_KEY', "The key of the project (e.g., 'PROJECT')" ) ), repoId: z .number() .optional() .describe(t('TOOL_UPDATE_PULL_REQUEST_COMMENT_REPO_ID', 'Repository ID')), repoName: z .string() .optional() .describe( t('TOOL_UPDATE_PULL_REQUEST_COMMENT_REPO_NAME', 'Repository name') ), number: z .number() .describe( t('TOOL_UPDATE_PULL_REQUEST_COMMENT_NUMBER', 'Pull request number') ), commentId: z .number() .describe(t('TOOL_UPDATE_PULL_REQUEST_COMMENT_COMMENT_ID', 'Comment ID')), content: z .string() .describe(t('TOOL_UPDATE_PULL_REQUEST_COMMENT_CONTENT', 'Comment content')), }));
- src/tools/tools.ts:134-134 (registration)Registration of the updatePullRequestCommentTool in the 'git' toolset group within the allTools export.updatePullRequestCommentTool(backlog, helper),