diff --git a/lib/workers/pr/release-notes.js b/lib/workers/pr/release-notes.js index 1a53fb9d8b541a1df160b3dcc0941a3c747c2133..e5f426a9fed63135f7d7e49a5e7b4f51df6db874 100644 --- a/lib/workers/pr/release-notes.js +++ b/lib/workers/pr/release-notes.js @@ -93,8 +93,23 @@ async function getReleaseNotesMd(repository, version) { logger.trace('Could not parse top level headings. Trying second level'); changelogParsed = changelogMd.match(/^##([^#]+?)\n([^]+?)(?=^##[^#])/gm); if (!changelogParsed || changelogParsed.length === 1) { - logger.info({ repository }, 'No second level changelogs headings found'); - return null; + logger.debug({ repository }, 'No second level changelogs headings found'); + changelogParsed = changelogMd.match( + /^###([^#]+?)\n([^]+?)(?=^###[^#])/gm + ); + if (!changelogParsed || changelogParsed.length === 1) { + logger.debug( + { repository }, + 'No second third changelogs headings found' + ); + changelogParsed = changelogMd.match( + /^####([^#]+?)\n([^]+?)(?=^####[^#])/gm + ); + if (!changelogParsed || changelogParsed.length === 1) { + logger.info({ repository }, 'No changelogs headings found'); + return null; + } + } } } for (const section of changelogParsed) {