(notes)
| 70 | return String(value).replace(/<[^>]*>/g, '') |
| 71 | } |
| 72 | const buildReleaseNotesPreview = (notes) => { |
| 73 | if (!notes) { |
| 74 | return '' |
| 75 | } |
| 76 | let text = '' |
| 77 | if (Array.isArray(notes)) { |
| 78 | text = notes.map((note) => note && (note.note || note.releaseNotes || note.title || '')).join('\n') |
| 79 | } else if (typeof notes === 'string') { |
| 80 | text = notes |
| 81 | } else { |
| 82 | text = String(notes) |
| 83 | } |
| 84 | const cleaned = stripHtmlTags(text).replace(/\r/g, '') |
| 85 | const lines = cleaned.split('\n').map((line) => line.trim()).filter(Boolean) |
| 86 | if (!lines.length) { |
| 87 | return '' |
| 88 | } |
| 89 | const firstLine = lines[0] |
| 90 | if (firstLine.length > 140) { |
| 91 | return `${firstLine.slice(0, 137)}...` |
| 92 | } |
| 93 | return firstLine |
| 94 | } |
| 95 | const buildProgressLabel = (progress) => { |
| 96 | if (!progress || typeof progress.percent !== 'number') { |
| 97 | return '' |
no test coverage detected