Skip to content

Commit

Permalink
fix RequestError [HttpError]: Empty value for parameter 'issue_number…
Browse files Browse the repository at this point in the history
…': undefined
  • Loading branch information
klausbadelt committed Mar 5, 2023
1 parent 2a28ec3 commit 71d9e79
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
9 changes: 4 additions & 5 deletions dist/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -23099,7 +23099,7 @@ const MAX_COMMENT_CHARS = 65536;
async function main$1() {
const token = core$1.getInput("github-token");
const githubClient = new github_2(token);
const workingDir = core$1.getInput('working-directory') || './';
const workingDir = core$1.getInput('working-directory') || './';
const lcovFile = path.join(workingDir, core$1.getInput("lcov-file") || "./coverage/lcov.info");
const baseFile = core$1.getInput("lcov-base");
const shouldFilterChangedFiles =
Expand Down Expand Up @@ -23148,11 +23148,10 @@ async function main$1() {
const baselcov = baseRaw && (await parse$2(baseRaw));
const body = diff(lcov, baselcov, options).substring(0, MAX_COMMENT_CHARS);

if (shouldDeleteOldComments) {
await deleteOldComments(githubClient, options, github_1);
}

if (github_1.eventName === "pull_request") {
if (shouldDeleteOldComments) {
await deleteOldComments(githubClient, options, github_1);
}
await githubClient.issues.createComment({
repo: github_1.repo.repo,
owner: github_1.repo.owner,
Expand Down
9 changes: 4 additions & 5 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const MAX_COMMENT_CHARS = 65536
async function main() {
const token = core.getInput("github-token")
const githubClient = new GitHub(token)
const workingDir = core.getInput('working-directory') || './';
const workingDir = core.getInput('working-directory') || './';
const lcovFile = path.join(workingDir, core.getInput("lcov-file") || "./coverage/lcov.info")
const baseFile = core.getInput("lcov-base")
const shouldFilterChangedFiles =
Expand Down Expand Up @@ -63,11 +63,10 @@ async function main() {
const baselcov = baseRaw && (await parse(baseRaw))
const body = diff(lcov, baselcov, options).substring(0, MAX_COMMENT_CHARS)

if (shouldDeleteOldComments) {
await deleteOldComments(githubClient, options, context)
}

if (context.eventName === "pull_request") {
if (shouldDeleteOldComments) {
await deleteOldComments(githubClient, options, context)
}
await githubClient.issues.createComment({
repo: context.repo.repo,
owner: context.repo.owner,
Expand Down

0 comments on commit 71d9e79

Please sign in to comment.