in index.js [321:352]
async function createCommentOnPullRequest(
deploymentCommit,
deploymentUrl,
deploymentName,
) {
if (!octokit) {
return;
}
const commentId = await findPreviousComment(
`:rocket: Built _${deploymentName}_ successfully!`,
);
const commentBody = buildCommentBody(
deploymentCommit,
deploymentUrl,
deploymentName,
);
if (commentId) {
await octokit.issues.updateComment({
...context.repo,
comment_id: commentId,
body: commentBody,
});
} else {
await octokit.issues.createComment({
...context.repo,
issue_number: context.issue.number,
body: commentBody,
});
}
}