fix: add summary comment on failure when warn-only: true

This commit is contained in:
Eric Bickle
2024-09-06 12:24:42 -07:00
parent 526b7f2f9b
commit ac1d2d7d35
5 changed files with 50 additions and 36 deletions
+3 -3
View File
@@ -17,13 +17,13 @@ const COMMENT_MARKER = '<!-- dependency-review-pr-comment-marker -->'
export async function commentPr(
commentContent: string,
config: ConfigurationOptions
config: ConfigurationOptions,
failureCount: number
): Promise<void> {
if (
!(
config.comment_summary_in_pr === 'always' ||
(config.comment_summary_in_pr === 'on-failure' &&
process.exitCode === core.ExitCode.Failure)
(config.comment_summary_in_pr === 'on-failure' && failureCount > 0)
)
) {
return