MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / publishRepro

Function publishRepro

packages/cli/src/commands/feedback.ts:69–82  ·  view source on GitHub ↗

* Publish a minimal repro and return its public URL. Degrades gracefully: * on failure it returns undefined so the issue still opens without a link.

(dir: string)

Source from the content-addressed store, hash-verified

67 * on failure it returns undefined so the issue still opens without a link.
68 */
69async function publishRepro(dir: string): Promise<string | undefined> {
70 const spinner = clack.spinner();
71 spinner.start("Publishing minimal repro...");
72 try {
73 const published = await publishProjectArchive(dir);
74 spinner.stop(c.success("Repro published"));
75 return published.url;
76 } catch (err: unknown) {
77 spinner.stop(c.error("Publish failed"));
78 console.error(` ${(err as Error).message}`);
79 console.log(` ${c.dim("Filing the issue without a repro link.")}`);
80 return undefined;
81 }
82}
83
84async function openAndPrintIssue(url: string): Promise<void> {
85 if (process.stdout.isTTY) {

Callers 1

fileGithubIssueFunction · 0.85

Calls 4

publishProjectArchiveFunction · 0.85
errorMethod · 0.80
startMethod · 0.45
stopMethod · 0.45

Tested by

no test coverage detected