MCPcopy Create free account
hub / github.com/TraderAlice/OpenAlice / serializeIssue

Function serializeIssue

src/workspaces/issues/mutate.ts:96–100  ·  view source on GitHub ↗

Serialize a frontmatter object + body back into the `---\n…\n---\n\n ` * document shape the reader expects. Body is preserved verbatim (trimmed).

(frontmatter: Record<string, unknown>, body: string)

Source from the content-addressed store, hash-verified

94/** Serialize a frontmatter object + body back into the `---\n…\n---\n\n<body>`
95 * document shape the reader expects. Body is preserved verbatim (trimmed). */
96function serializeIssue(frontmatter: Record<string, unknown>, body: string): string {
97 const fm = stringifyYaml(frontmatter).trimEnd()
98 const trimmed = body.trim()
99 return trimmed ? `---\n${fm}\n---\n\n${trimmed}\n` : `---\n${fm}\n---\n`
100}
101
102/**
103 * Patch one or more board fields on an existing issue. Reads the file, validates

Callers 2

updateIssueFieldsFunction · 0.85
createIssueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected