Update pull request review schema to allow line or position
Allow either line or position in PR review comments, but not both, to align with GitHub API functionality. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
5e54cd33bd
commit
1c175614f6
1 changed files with 14 additions and 5 deletions
|
|
@ -112,11 +112,20 @@ export const CreatePullRequestReviewSchema = z.object({
|
||||||
commit_id: z.string().optional().describe("The SHA of the commit that needs a review"),
|
commit_id: z.string().optional().describe("The SHA of the commit that needs a review"),
|
||||||
body: z.string().describe("The body text of the review"),
|
body: z.string().describe("The body text of the review"),
|
||||||
event: z.enum(['APPROVE', 'REQUEST_CHANGES', 'COMMENT']).describe("The review action to perform"),
|
event: z.enum(['APPROVE', 'REQUEST_CHANGES', 'COMMENT']).describe("The review action to perform"),
|
||||||
comments: z.array(z.object({
|
comments: z.array(
|
||||||
path: z.string().describe("The relative path to the file being commented on"),
|
z.union([
|
||||||
position: z.number().describe("The position in the diff where you want to add a review comment"),
|
z.object({
|
||||||
body: z.string().describe("Text of the review comment")
|
path: z.string().describe("The relative path to the file being commented on"),
|
||||||
})).optional().describe("Comments to post as part of the review")
|
position: z.number().describe("The position in the diff where you want to add a review comment"),
|
||||||
|
body: z.string().describe("Text of the review comment")
|
||||||
|
}),
|
||||||
|
z.object({
|
||||||
|
path: z.string().describe("The relative path to the file being commented on"),
|
||||||
|
line: z.number().describe("The line number in the file where you want to add a review comment"),
|
||||||
|
body: z.string().describe("Text of the review comment")
|
||||||
|
})
|
||||||
|
])
|
||||||
|
).optional().describe("Comments to post as part of the review (specify either position or line, not both)")
|
||||||
});
|
});
|
||||||
|
|
||||||
export const MergePullRequestSchema = z.object({
|
export const MergePullRequestSchema = z.object({
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue