From fe89030bdf3f9559210285b649eb7b5fb19a050e Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 10 Oct 2024 05:16:05 +0000 Subject: [PATCH] chore: update dist files --- dist/index.js | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/dist/index.js b/dist/index.js index ca284da..4e313d6 100644 --- a/dist/index.js +++ b/dist/index.js @@ -53064,9 +53064,13 @@ const pullRequestFiles = ( ).data.map((file) => file.filename) // Get the diff between the head branch and the base branch (limit to the files in the pull request) -const diff = await (0,_actions_exec__WEBPACK_IMPORTED_MODULE_1__.getExecOutput)('git', ['diff', '--unified=0', '--', ...pullRequestFiles], { - silent: true, -}) +const diff = await (0,_actions_exec__WEBPACK_IMPORTED_MODULE_1__.getExecOutput)( + 'git', + ['diff', '--unified=0', '--', ...pullRequestFiles], + { + silent: true, + } +) ;(0,_actions_core__WEBPACK_IMPORTED_MODULE_0__.debug)(`Diff output: ${diff.stdout}`) @@ -53075,7 +53079,7 @@ const parsedDiff = (0,parse_git_diff__WEBPACK_IMPORTED_MODULE_4__/* ["default"] // Get changed files from parsedDiff (changed files have type 'ChangedFile') const changedFiles = parsedDiff.files.filter( - (/** @type {{ type: string; }} */ file) => file.type === 'ChangedFile' + (file) => file.type === 'ChangedFile' ) const generateSuggestionBody = (changes) => { @@ -53115,11 +53119,11 @@ const comments = changedFiles.flatMap(({ path, chunks }) => (0,_actions_core__WEBPACK_IMPORTED_MODULE_0__.debug)(`Starting line: ${fromFileRange.start}`) ;(0,_actions_core__WEBPACK_IMPORTED_MODULE_0__.debug)(`Number of lines: ${fromFileRange.lines}`) ;(0,_actions_core__WEBPACK_IMPORTED_MODULE_0__.debug)(`Changes: ${JSON.stringify(changes)}`) - if (fromFileRange.start === fromFileRange.lines && changes.length === 2) { - return createSingleLineComment(path, fromFileRange, changes) - } else { - return createMultiLineComment(path, fromFileRange, changes) - } + const comment = + fromFileRange.lines <= 1 + ? createSingleLineComment(path, fromFileRange, changes) + : createMultiLineComment(path, fromFileRange, changes) + return comment }) )