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);