in index.js [209:227]
async function findCommentsForEvent() {
core.debug('find comments for event');
if (context.eventName === 'push') {
core.debug('event is "commit", use "listCommentsForCommit"');
return octokit.repos.listCommentsForCommit({
...context.repo,
commit_sha: context.sha,
});
}
if (isPullRequestType(context.eventName)) {
core.debug(`event is "${context.eventName}", use "listComments"`);
return octokit.issues.listComments({
...context.repo,
issue_number: context.issue.number,
});
}
core.error('not supported event_type');
return [];
}