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

fix Empty value for parameter 'issue_number': undefined #61

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
10 changes: 5 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,11 @@ 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" || context.eventName === "pull_request_target") {
if (shouldDeleteOldComments) {
await deleteOldComments(githubClient, options, context)
}

await githubClient.issues.createComment({
repo: context.repo.repo,
owner: context.repo.owner,
Expand Down