Skip to content

Commit 20fc086

Browse files
Merge pull request product-os#1455 from product-os/kyle/format-notes-type-error
Catch unhandled type errors when release notes are not matched
2 parents f79b795 + 5c36767 commit 20fc086

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.github/workflows/flowzone.yml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flowzone.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1441,7 +1441,7 @@ jobs:
14411441
const isRenovate = pr.user.type === 'Bot' && pr.user.login.includes('renovate');
14421442
const renovateReleaseNotesMatch = pr.body.match(/### Release Notes([\s\S]*?)---/);
14431443
1444-
if (isRenovate && renovateReleaseNotesMatch[1]) {
1444+
if (isRenovate && renovateReleaseNotesMatch != null && renovateReleaseNotesMatch[1]) {
14451445
const releaseNotesBody = renovateReleaseNotesMatch[1].trim();
14461446
14471447
// Extract notable changes
@@ -1475,7 +1475,7 @@ jobs:
14751475
const customReleaseNotesMatch = pr.body.match(/## Release Notes([\s\S]*?)(?=## |$)/i);
14761476
console.log('match:', JSON.stringify(customReleaseNotesMatch, null, 2));
14771477
1478-
if (customReleaseNotesMatch[1]) {
1478+
if (customReleaseNotesMatch != null && customReleaseNotesMatch[1]) {
14791479
const releaseNotesBody = customReleaseNotesMatch[1].trim();
14801480
console.log('releaseNotesBody:', releaseNotesBody);
14811481

0 commit comments

Comments
 (0)