Skip to content

Commit d024fa6

Browse files
Refactor logging (#25)
Refactor logging to group diff retrieval for better readability
1 parent ca31112 commit d024fa6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pr-summary/src/main.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,9 @@ export async function run(config: Config): Promise<void> {
4747
})
4848
}
4949

50-
core.info(`Get diff for PR #${config.prNumber} (${base}...${head})`)
50+
core.startGroup(`Get diff for PR #${config.prNumber} (${base}...${head})`)
5151
const { data: diff } = await octokit.rest.repos.compareCommits({ ...repoRef, base, head, mediaType: { format: "diff" } })
5252
const comparison = parseDiff(diff as unknown as string)
53-
5453
comparison.forEach(file => {
5554
const fileName = file.from === file.to ? file.from : `${file.from}${file.to}`
5655
const fileStatus = file.deleted ? "deleted" : file.new ? "added" : file.from !== file.to ? "renamed" : "modified" // eslint-disable-line sonarjs/no-nested-conditional

0 commit comments

Comments
 (0)