Skip to content

Commit

Permalink
chore(action): fixed issue with var
Browse files Browse the repository at this point in the history
  • Loading branch information
DarrellRichards committed Jun 1, 2024
1 parent f31493d commit 27ffb14
Showing 1 changed file with 35 additions and 33 deletions.
68 changes: 35 additions & 33 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,39 +20,41 @@ export interface Details {
async function validateCode(diff: File[], details: Details) {
const neededComments = [];

for (const file of diff) {
for (const chunk of file.chunks) {
const message = await prSummaryCreation(file.to ?? "", details.title);
console.log('message', message);
// const results = await validateCodeViaAI(file, chunk, details);

// if (results) {
// const mappedResults = results.flatMap((result: any) => {
// if (!file.to) {
// return [];
// }

// if (!result.lineNumber) {
// return [];
// }

// if (!result.review) {
// return [];
// }

// return {
// body: result.review,
// path: file.to,
// position: Number(result.lineNumber),
// };
// });

// if (mappedResults) {
// neededComments.push(...mappedResults);
// }
// }
}
}
const message = await prSummaryCreation(diff, details.title);
console.log('message', message);
// for (const file of diff) {

// for (const chunk of file.chunks) {

// // const results = await validateCodeViaAI(file, chunk, details);

// // if (results) {
// // const mappedResults = results.flatMap((result: any) => {
// // if (!file.to) {
// // return [];
// // }

// // if (!result.lineNumber) {
// // return [];
// // }

// // if (!result.review) {
// // return [];
// // }

// // return {
// // body: result.review,
// // path: file.to,
// // position: Number(result.lineNumber),
// // };
// // });

// // if (mappedResults) {
// // neededComments.push(...mappedResults);
// // }
// // }
// }
// }
return [];
}

Expand Down

0 comments on commit 27ffb14

Please sign in to comment.