MCPcopy Create free account
hub / github.com/github/awesome-copilot / buildQualityGatesCommentSection

Function buildQualityGatesCommentSection

eng/external-plugin-intake.mjs:444–491  ·  view source on GitHub ↗
(qualityResult)

Source from the content-addressed store, hash-verified

442}
443
444function buildQualityGatesCommentSection(qualityResult) {
445 const vallyState = qualityResult.vally_lint_status || "not_run";
446 const smokeState = qualityResult.smoke_status || "not_run";
447 const summaryText = String(qualityResult.summary || "").trim() || "_No quality gate details were provided._";
448
449 const sections = [
450 "### Quality gate summary",
451 "",
452 "| Gate | Status |",
453 "|---|---|",
454 `| vally lint | ${vallyState} |`,
455 `| install smoke test | ${smokeState} |`,
456 "",
457 summaryText,
458 ];
459
460 const vallyOutput = String(qualityResult.vally_lint_output || "").trim();
461 if (vallyOutput) {
462 sections.push(
463 "",
464 "<details>",
465 "<summary>vally lint output</summary>",
466 "",
467 "```text",
468 vallyOutput,
469 "```",
470 "",
471 "</details>",
472 );
473 }
474
475 const smokeOutput = String(qualityResult.smoke_output || "").trim();
476 if (smokeOutput) {
477 sections.push(
478 "",
479 "<details>",
480 "<summary>Install smoke test output</summary>",
481 "",
482 "```text",
483 smokeOutput,
484 "```",
485 "",
486 "</details>",
487 );
488 }
489
490 return sections.join("\n");
491}
492
493function getIntakeStateFromQualityResult(baseResult, qualityResult) {
494 if (!baseResult.valid) {

Callers 1

buildMergedIntakeCommentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected