Open aropan opened 2 years ago
I think this problem with check shouldDeleteOldComments
. It should be inside condition (github_1.eventName === "pull_request") {
:
...
if (shouldDeleteOldComments) {
await deleteOldComments(githubClient, options, github_1);
}
if (github_1.eventName === "pull_request") {
await githubClient.issues.createComment({
repo: github_1.repo.repo,
owner: github_1.repo.owner,
issue_number: github_1.payload.pull_request.number,
body: body,
});
} else if (github_1.eventName === "push") {
await githubClient.repos.createCommitComment({
repo: github_1.repo.repo,
owner: github_1.repo.owner,
commit_sha: options.commit,
body: body,
});
}
...
@aropan thanks this was saving me too (on a fork :) ), triggering report coverage step for a workflow that is not PR produces this error
in the step we could disable report coverage by adding the if
you was talking about 👍
- name: Report coverage
if: github.event_name == 'pull_request'
I got the error on push:
when using config: