(body: string)
| 167 | |
| 168 | /** Parse bumpy metadata from a release body */ |
| 169 | export function parseReleaseMetadata(body: string): ReleaseMetadata | null { |
| 170 | const startIdx = body.indexOf(METADATA_START); |
| 171 | const endIdx = body.indexOf(METADATA_END); |
| 172 | if (startIdx === -1 || endIdx === -1) return null; |
| 173 | |
| 174 | const jsonStr = body.slice(startIdx + METADATA_START.length, endIdx).trim(); |
| 175 | try { |
| 176 | return JSON.parse(jsonStr); |
| 177 | } catch { |
| 178 | return null; |
| 179 | } |
| 180 | } |
| 181 | |
| 182 | /** Serialize metadata into an HTML comment */ |
| 183 | function serializeMetadata(metadata: ReleaseMetadata): string { |
no outgoing calls
no test coverage detected
searching dependent graphs…