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 e2e81c0 commit 5c0496e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,15 @@ 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
});
core.info('Added the pull request link to the Asana task.');
}
}
}
} catch (ex) {
console.error(ex.value);
Expand Down

0 comments on commit 5c0496e

Please sign in to comment.