Update scripts

This commit is contained in:
freearhey committed 2025-02-27 20:55:39 +03:00
1 parent 86eda24dcc
commit aa215b3fcb
5 files changed
+109 -69

No files matched your search

+2 -2
View File
@@ -25,11 +25,11 @@ const FIELDS = new Dictionary({
export class IssueParser {
parse(issue: { number: number; body: string; labels: { name: string }[] }): Issue {
const fields = issue.body.split('###')
const fields = typeof issue.body === 'string' ? issue.body.split('###') : []
const data = new Dictionary()
fields.forEach((field: string) => {
const parsed = field.split(/\r?\n/).filter(Boolean)
const parsed = typeof field === 'string' ? field.split(/\r?\n/).filter(Boolean) : []
let _label = parsed.shift()
_label = _label ? _label.trim() : ''
let _value = parsed.join('\r\n')