File tree Expand file tree Collapse file tree
packages/opencode/src/cli/cmd Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1263,6 +1263,23 @@ export const githubRun = Effect.fn("Cli.github.run")(function* (args: { event?:
12631263
12641264 async function createComment ( body : string ) {
12651265 // Only called for non-schedule events, so issueId is defined
1266+ if ( commentType === "pr_review" ) {
1267+ const comment = ( payload as PullRequestReviewCommentEvent ) . comment
1268+ console . log ( "Creating review thread reply..." )
1269+ try {
1270+ return await octoRest . rest . pulls . createReplyForReviewComment ( {
1271+ owner,
1272+ repo,
1273+ pull_number : issueId ! ,
1274+ // Replies must target the thread's root comment; a reply's own id is rejected
1275+ comment_id : comment . in_reply_to_id ?? comment . id ,
1276+ body,
1277+ } )
1278+ } catch ( error ) {
1279+ // Fall through to a top-level comment so the response is never lost
1280+ console . error ( `Failed to reply in the review thread: ${ error } ` )
1281+ }
1282+ }
12661283 console . log ( "Creating comment..." )
12671284 return await octoRest . rest . issues . createComment ( {
12681285 owner,
You can’t perform that action at this time.
0 commit comments