MCPcopy Index your code
hub / github.com/code-pushup/cli / checkPrintConfig

Function checkPrintConfig

packages/ci/src/lib/run-utils.ts:455–476  ·  view source on GitHub ↗
(
  args: BaseReportArgs,
)

Source from the content-addressed store, hash-verified

453}
454
455export async function checkPrintConfig(
456 args: BaseReportArgs,
457): Promise<EnhancedPersistConfig | null> {
458 const { project, ctx, base } = args;
459
460 const operation = project
461 ? `Executing print-config for project ${project.name}`
462 : 'Executing print-config';
463 try {
464 const config = await printPersistConfig(ctx);
465 logDebug(
466 `${operation} verified code-pushup installed in base branch ${base.ref}`,
467 );
468 return config;
469 } catch (error) {
470 logDebug(`Error from print-config - ${stringifyError(error)}`);
471 logInfo(
472 `${operation} failed, assuming code-pushup not installed in base branch ${base.ref} and skipping comparison`,
473 );
474 return null;
475 }
476}
477
478export async function printPersistConfig(
479 ctx: CommandContext,

Callers 2

collectPreviousReportsFunction · 0.85
collectPreviousReportFunction · 0.85

Calls 4

stringifyErrorFunction · 0.90
printPersistConfigFunction · 0.85
logDebugFunction · 0.85
logInfoFunction · 0.85

Tested by

no test coverage detected