fix: address review findings (#3968)

This commit is contained in:
Jinjing
2026-05-30 18:33:31 -07:00
committed by GitHub
parent 2dbebd1f54
commit 7686eaba2d
15 changed files with 2100 additions and 219 deletions
+7 -4
View File
@@ -171,7 +171,8 @@ const UpdateIssue = RepoSelector.extend({
const IssueComment = RepoSelector.extend({
number: z.number().int().positive(),
body: requiredString('Comment body required'),
type: z.enum(['issue', 'pr']).optional()
type: z.enum(['issue', 'pr']).optional(),
prRepo: SlugRepo.nullable().optional()
})
const PRReviewComment = RepoSelector.extend({
@@ -189,7 +190,8 @@ const PRReviewCommentReply = RepoSelector.extend({
body: requiredString('Comment body required'),
threadId: OptionalString,
path: OptionalString,
line: z.number().int().positive().optional()
line: z.number().int().positive().optional(),
prRepo: SlugRepo.nullable().optional()
})
const ProjectOwnerType = z.enum(['organization', 'user'])
@@ -500,7 +502,7 @@ export const GITHUB_METHODS: RpcMethod[] = [
name: 'github.addIssueComment',
params: IssueComment,
handler: async (params, { runtime }) =>
runtime.addRepoIssueComment(params.repo, params.number, params.body)
runtime.addRepoIssueComment(params.repo, params.number, params.body, params.prRepo ?? null)
}),
defineMethod({
name: 'github.addPRReviewComment',
@@ -525,7 +527,8 @@ export const GITHUB_METHODS: RpcMethod[] = [
body: params.body,
threadId: params.threadId,
path: params.path,
line: params.line
line: params.line,
prRepo: params.prRepo ?? null
})
}),
defineMethod({