From 2531a75f65ec0e848eb9e6c184592ad9a6852a87 Mon Sep 17 00:00:00 2001 From: Federico Builes Date: Tue, 20 Feb 2024 18:30:11 +0100 Subject: [PATCH] dont generate output --- src/comment-pr.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/comment-pr.ts b/src/comment-pr.ts index a2fc38b..6421bea 100644 --- a/src/comment-pr.ts +++ b/src/comment-pr.ts @@ -19,8 +19,6 @@ export async function commentPr( ): Promise { const commentContent = summary.stringify() - core.setOutput('comment-content', commentContent) - if ( config.comment_summary_in_pr === 'always' || (config.comment_summary_in_pr === 'on-failure' && @@ -29,6 +27,8 @@ export async function commentPr( return } + core.setOutput('comment-content', commentContent) + if (!github.context.payload.pull_request) { core.warning( 'Not in the context of a pull request. Skipping comment creation.'