File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,8 @@ export async function prepareJunieTask(
5858 junieCLITask . mergeTask = { branch : branchInfo . prBaseBranch || branchInfo . baseBranch }
5959 } else if ( isCodeReviewEvent ( context ) ) {
6060 const diffPoint = context . isPR ? String ( context . entityNumber ) : branchInfo . prBaseBranch || branchInfo . baseBranch ;
61- junieCLITask . codeReviewTask = { diffPoint}
61+ const diffCommand = `gh pr diff ${ diffPoint } ` ;
62+ junieCLITask . codeReview = { diffCommand}
6263 } else {
6364 const formatter = new NewGitHubPromptFormatter ( ) ;
6465 let fetchedData : FetchedData = { } ;
@@ -89,7 +90,7 @@ export async function prepareJunieTask(
8990 junieCLITask . task = await getValidatedTextTask ( promptText ) ;
9091 }
9192
92- if ( ! junieCLITask . task && ! junieCLITask . mergeTask && ! junieCLITask . codeReviewTask ) {
93+ if ( ! junieCLITask . task && ! junieCLITask . mergeTask && ! junieCLITask . codeReview ) {
9394 throw new Error ( "No task was created. Please check your inputs." ) ;
9495 }
9596
Original file line number Diff line number Diff line change @@ -13,12 +13,13 @@ export interface MergeTask {
1313 branch : string ;
1414}
1515
16- export interface CodeReviewTask {
17- diffPoint : string ;
16+ export interface CodeReview {
17+ description ?: string ;
18+ diffCommand ?: string ;
1819}
1920
2021export interface CliInput {
2122 task ?: string ;
2223 mergeTask ?: MergeTask ;
23- codeReviewTask ?: CodeReviewTask ;
24+ codeReview ?: CodeReview ;
2425}
You can’t perform that action at this time.
0 commit comments