* Clean field value: remove "_No response_" placeholder, return undefined if field is empty or invalid
(value: string | undefined)
| 60 | * Clean field value: remove "_No response_" placeholder, return undefined if field is empty or invalid |
| 61 | */ |
| 62 | function cleanFieldValue(value: string | undefined): string | undefined { |
| 63 | if (!value) return undefined; |
| 64 | const trimmed = value.trim(); |
| 65 | if (trimmed.length === 0 || trimmed === '_No response_') { |
| 66 | return undefined; |
| 67 | } |
| 68 | return trimmed; |
| 69 | } |
| 70 | |
| 71 | async function parseIssue(issueBody: string): Promise<IssueFields> { |
| 72 | const fields: Record<string, string> = {}; |