From 66e22994fd7b674529e21ac8c6db013a8044cf5a Mon Sep 17 00:00:00 2001 From: Sergi Serrano Casalins Date: Wed, 19 May 2021 13:13:01 +0200 Subject: [PATCH] add log output when comment already exists --- index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 5b43e149..2198f1a9 100644 --- a/index.js +++ b/index.js @@ -38,8 +38,10 @@ async function asanaOperations( }); if (taskComment) { - const shouldSend = !(await commentAlreadySent(client, taskId, taskComment)); - if (shouldSend) { + const shouldSkip = await commentAlreadySent(client, taskId, taskComment); + if (shouldSkip) { + core.info('Pull request link was already added.') + } else { await client.tasks.addComment(taskId, { text: taskComment });