Skip to content

Commit

Permalink
add log output when comment already exists
Browse files Browse the repository at this point in the history
  • Loading branch information
SergiSC committed May 19, 2021
1 parent a47526c commit 66e2299
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
});
Expand Down

0 comments on commit 66e2299

Please sign in to comment.