Update scripts

This commit is contained in:
freearhey 2023-10-16 14:45:12 +03:00
parent e2a5105e69
commit 4d5c6fee64
7 changed files with 140 additions and 104 deletions

View file

@ -1,5 +1,5 @@
import { Dictionary } from '@freearhey/core'
import { Issue } from '../models'
import { IssueData, Issue } from '../core'
const FIELDS = new Dictionary({
'Channel ID': 'channel_id',
@ -52,7 +52,8 @@ export class IssueParser {
if (!_label || !_value) return data
const id: string = FIELDS.get(_label)
const value: string = _value === '_No response_' || _value === 'None' ? '' : _value
const value: string | undefined =
_value === '_No response_' || _value === 'None' ? undefined : _value
if (!id) return
@ -61,6 +62,6 @@ export class IssueParser {
const labels = issue.labels.map(label => label.name)
return new Issue({ number: issue.number, labels, data })
return new Issue({ number: issue.number, labels, data: new IssueData(data) })
}
}