Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RequestError [HttpError]: Empty value for parameter 'issue_number': undefined #33

Open
aropan opened this issue Dec 3, 2021 · 2 comments · May be fixed by #61
Open

RequestError [HttpError]: Empty value for parameter 'issue_number': undefined #33

aropan opened this issue Dec 3, 2021 · 2 comments · May be fixed by #61

Comments

@aropan
Copy link

aropan commented Dec 3, 2021

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
...
@aropan
Copy link
Author

aropan commented Dec 3, 2021

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,
		});
	}
...

@boly38
Copy link

boly38 commented Jun 13, 2024

@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'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants