From e06e959d6b44c6a563a0d91cce48bb95f1b8bc4f Mon Sep 17 00:00:00 2001 From: James Warwood Date: Mon, 1 Jul 2024 09:03:01 +0100 Subject: [PATCH] fix: Allow reactions to be added to an existing comment without providing `message` Skip issues.updateComment call if no message was provided. --- src/main.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/main.ts b/src/main.ts index 62e1ee81..a5e2db23 100644 --- a/src/main.ts +++ b/src/main.ts @@ -93,12 +93,14 @@ async function run() { comment_id: number; body: string; }) { - const { data: comment } = await octokit.rest.issues.updateComment({ - owner, - repo, - comment_id, - body, - }); + if (body) { + const { data: comment } = await octokit.rest.issues.updateComment({ + owner, + repo, + comment_id, + body, + }); + } core.setOutput('id', comment.id); core.setOutput('body', comment.body);