Adds option to write summary into a pr comment

This commit is contained in:
David Losert
2023-02-16 10:03:16 +00:00
committed by GitHub
parent 5c771993de
commit 1c85e9db8d
7 changed files with 116 additions and 21 deletions
+4
View File
@@ -15,6 +15,7 @@ import * as summary from './summary'
import {getRefs} from './git-refs'
import {groupDependenciesByManifest} from './utils'
import {commentPr} from './comment-pr'
async function run(): Promise<void> {
try {
@@ -69,6 +70,9 @@ async function run(): Promise<void> {
summary.addScannedDependencies(changes)
printScannedDependencies(changes)
if (config.comment_summary_in_pr) {
await commentPr(core.summary)
}
} catch (error) {
if (error instanceof RequestError && error.status === 404) {
core.setFailed(