lcov-reporter-action
lcov-reporter-action copied to clipboard
RequestError [HttpError]: Empty value for parameter 'issue_number': undefined
I got the error on push:
...
RequestError [HttpError]: Empty value for parameter 'issue_number': undefined
at /data/actions-runner/_work/_actions/romeovs/lcov-reporter-action/v0.3.1/dist/main.js:22256:15
at Array.forEach (<anonymous>)
at /data/actions-runner/_work/_actions/romeovs/lcov-reporter-action/v0.3.1/dist/main.js:22224:12
at Array.forEach (<anonymous>)
at validate$1 (/data/actions-runner/_work/_actions/romeovs/lcov-reporter-action/v0.3.1/dist/main.js:22197:23) {
status: 400,
...
when using config:
...
- name: Report
uses: romeovs/[email protected]
with:
lcov-file: lcov.info
lcov-base: base.lcov.info
github-token: ${{ secrets.GITHUB_TOKEN }}
filter-changed-files: true
delete-old-comments: true
...
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'