diff --git a/src/index.ts b/src/index.ts index 5f04dd9..68b2a42 100644 --- a/src/index.ts +++ b/src/index.ts @@ -34,6 +34,10 @@ async function validateCode(diff: File[], details: Details) { return []; } + if (!result.review) { + return []; + } + return { body: result.review, path: file.to, @@ -85,9 +89,9 @@ async function main() { description }); - // if (neededComments && neededComments.length > 0) { - // await createReviewComment(repository.owner.login, repository.name, number, neededComments); - // } + if (neededComments && neededComments.length > 0) { + await createReviewComment(repository.owner.login, repository.name, number, neededComments); + } console.log('neededComments', neededComments);