(releaseNotes: string | null)
| 77 | ]; |
| 78 | |
| 79 | export const createPRCommentFromNotes = (releaseNotes: string | null) => { |
| 80 | let body = constants.NO_NOTES_BODY; |
| 81 | if (releaseNotes && !OMIT_FROM_RELEASE_NOTES_KEYS.some((rx) => rx.test(releaseNotes))) { |
| 82 | const splitNotes = releaseNotes.split('\n').filter((line) => line !== ''); |
| 83 | if (splitNotes.length > 0) { |
| 84 | const quoted = splitNotes.map((line) => `> ${line}`).join('\n'); |
| 85 | body = `${constants.NOTES_LEAD}\n\n${quoted}`; |
| 86 | } |
| 87 | } |
| 88 | |
| 89 | debug(`Created PR comment from releaseNotes: ${body}`); |
| 90 | |
| 91 | return body; |
| 92 | }; |
no outgoing calls
no test coverage detected