@kakarot-ci/core 0.6.5 → 0.6.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -164,8 +164,6 @@ var GitHubClient = class {
164
164
  this.retryDelay = 1e3;
165
165
  this.owner = options.owner;
166
166
  this.repo = options.repo;
167
- const originalConsoleError = console.error;
168
- const originalConsoleWarn = console.warn;
169
167
  this.octokit = new Octokit({
170
168
  auth: options.token,
171
169
  request: {
@@ -173,8 +171,6 @@ var GitHubClient = class {
173
171
  retryAfter: this.retryDelay / 1e3
174
172
  }
175
173
  });
176
- console.error = originalConsoleError;
177
- console.warn = originalConsoleWarn;
178
174
  }
179
175
  /**
180
176
  * Retry wrapper with exponential backoff
@@ -375,21 +371,23 @@ var GitHubClient = class {
375
371
  async fileExists(ref, path) {
376
372
  const originalError = console.error;
377
373
  const originalWarn = console.warn;
378
- const suppressedError = (...args) => {
379
- const message = args.join(" ");
380
- if (!message.includes("404") && !message.includes("Not Found")) {
381
- originalError(...args);
374
+ const suppress404 = (...args) => {
375
+ const message = String(args[0] || "");
376
+ if (message.includes("404") || message.includes("Not Found")) {
377
+ return;
382
378
  }
379
+ originalError(...args);
383
380
  };
384
- const suppressedWarn = (...args) => {
385
- const message = args.join(" ");
386
- if (!message.includes("404") && !message.includes("Not Found")) {
387
- originalWarn(...args);
381
+ const suppress404Warn = (...args) => {
382
+ const message = String(args[0] || "");
383
+ if (message.includes("404") || message.includes("Not Found")) {
384
+ return;
388
385
  }
386
+ originalWarn(...args);
389
387
  };
390
388
  try {
391
- console.error = suppressedError;
392
- console.warn = suppressedWarn;
389
+ console.error = suppress404;
390
+ console.warn = suppress404Warn;
393
391
  await this.octokit.rest.repos.getContent({
394
392
  owner: this.owner,
395
393
  repo: this.repo,
@@ -1954,13 +1952,12 @@ async function runPullRequest(context) {
1954
1952
  summary.coverageReport = coverageReport;
1955
1953
  summary.testResults = finalTestResults;
1956
1954
  } else {
1957
- warn("Could not read coverage report");
1955
+ debug("Could not read coverage report (coverage package may be missing)");
1958
1956
  }
1959
1957
  } catch (err) {
1960
1958
  const errorMessage = err instanceof Error ? err.message : String(err);
1961
1959
  if (errorMessage.includes("coverage") || errorMessage.includes("MISSING DEPENDENCY")) {
1962
- warn(`Coverage collection failed (likely missing coverage package): ${errorMessage}`);
1963
- warn("Continuing without coverage report");
1960
+ debug(`Coverage collection skipped (missing coverage package): ${errorMessage.split("\n")[0]}`);
1964
1961
  } else {
1965
1962
  throw err;
1966
1963
  }