diff --git a/dist/index.js b/dist/index.js index 3a9d5eb..7d1cfee 100644 --- a/dist/index.js +++ b/dist/index.js @@ -21943,7 +21943,7 @@ function run() { const resultsFilePath = path_1.default.resolve(__dirname, RESULTS_FILE); if (isMainBranch) { let base; - const { output: baseOutput } = yield term.execSizeLimit(null, buildScript, cleanScript, windowsVerbatimArguments, directory); + const { output: baseOutput } = yield term.execSizeLimit(skipStep, buildScript, cleanScript, windowsVerbatimArguments, directory); try { base = limit.parseResults(baseOutput); } @@ -21986,15 +21986,16 @@ function run() { throw error; } const thresholdNumber = Number(threshold); + // @ts-ignore + const sizeLimitComment = yield fetchPreviousComment(octokit, repo, pr); const shouldComment = isNaN(thresholdNumber) || - limit.hasSizeChanges(base, current, thresholdNumber); + limit.hasSizeChanges(base, current, thresholdNumber) || + sizeLimitComment; if (shouldComment) { const body = [ SIZE_LIMIT_HEADING, (0, markdown_table_1.markdownTable)(limit.formatResults(base, current)), ].join("\r\n"); - // @ts-ignore - const sizeLimitComment = yield fetchPreviousComment(octokit, repo, pr); try { if (!sizeLimitComment) { yield octokit.rest.issues.createComment(Object.assign(Object.assign({}, repo), { diff --git a/src/main.ts b/src/main.ts index 588f2c4..19a3e24 100644 --- a/src/main.ts +++ b/src/main.ts @@ -66,7 +66,7 @@ async function run() { if (isMainBranch) { let base; const { output: baseOutput } = await term.execSizeLimit( - null, + skipStep, buildScript, cleanScript, windowsVerbatimArguments, @@ -137,9 +137,13 @@ async function run() { const thresholdNumber = Number(threshold); + // @ts-ignore + const sizeLimitComment = await fetchPreviousComment(octokit, repo, pr); + const shouldComment = isNaN(thresholdNumber) || - limit.hasSizeChanges(base, current, thresholdNumber); + limit.hasSizeChanges(base, current, thresholdNumber) || + sizeLimitComment; if (shouldComment) { const body = [ @@ -147,9 +151,6 @@ async function run() { markdownTable(limit.formatResults(base, current)), ].join("\r\n"); - // @ts-ignore - const sizeLimitComment = await fetchPreviousComment(octokit, repo, pr); - try { if (!sizeLimitComment) { await octokit.rest.issues.createComment({