Skip to content

Commit

Permalink
bugfix W-8978605 (#943)
Browse files Browse the repository at this point in the history
  • Loading branch information
maggiben committed Jun 21, 2021
1 parent 7092357 commit f51c1d8
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
12 changes: 12 additions & 0 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,20 @@ async function run() {
}
}

const {data: comments} = await octokit.issues.listComments({
owner,
repo,
issue_number: issue.number,
});

// If we have comments check out that this comment has not been previously commented
if (comments.length) {
if (comments.some(comment => comment.body === message)) {
console.log('Already commented')
return
}
}

const response = await octokit.issues.createComment({
owner,
repo,
Expand Down

0 comments on commit f51c1d8

Please sign in to comment.