cloudflare/kumo

Public

mirrored fromhttps://github.com/cloudflare/kumoAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
d86c9318c15924a4d4fab2205271148f8f184454

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

ci/reporters/kumo-docs-preview.ts

32lines · modecode

1/**
2 * Kumo Docs Preview Reporter
3 *
4 * Reports the deployed kumo-docs preview URL.
5 */
6
7import type { CIContext, ReportItem, Reporter } from "./types";
8
9export const kumoDocsPreviewReporter: Reporter = {
10 id: "kumo-docs-preview",
11 name: "Kumo Docs Preview",
12
13 async collect(context: CIContext): Promise<ReportItem | null> {
14 const { kumoDocsPreviewUrl, shortSha } = context;
15
16 if (!kumoDocsPreviewUrl) {
17 return null;
18 }
19
20 const content = `**Preview URL:** [${kumoDocsPreviewUrl}](${kumoDocsPreviewUrl})
21
22This preview deployment (\`${shortSha}\`) contains the latest documentation changes from this MR.`;
23
24 return {
25 id: "kumo-docs-preview",
26 title: "📚 Documentation Preview",
27 priority: 30,
28 content,
29 success: true,
30 };
31 },
32};