@@ -1517,40 +1517,43 @@ jobs:
1517
1517
1518
1518
// Check if PR is from Renovate
1519
1519
const isRenovate = pr.user.type === 'Bot' && pr.user.login.includes('renovate');
1520
- const hasReleaseNotes = pr.body.includes('### Release Notes');
1521
-
1522
- if (!isRenovate && hasReleaseNotes) {
1523
- // Extract release notes section
1524
- const releaseNotesMatch = pr.body.match(/### Release Notes\n([\s\S]*?)---/);
1525
- if (releaseNotesMatch) {
1526
- const prBody = releaseNotesMatch[1].trim();
1527
-
1528
- // Extract notable changes
1529
- const notableChanges = prBody
1530
- .split('\n')
1531
- .filter(line => line.match(/^> -|^-|^<summary>/))
1532
- .map(line => line.replace(/^<summary>(.*)<\/summary>/, '-$1'))
1533
- .filter((line, index, self) => self.indexOf(line) === index)
1534
- .slice(1);
1535
-
1536
- // Format release notes
1537
- const releaseNotesChanges = notableChanges
1538
- .map(line => line.replace(/^> -(.*)/, ' -$1'))
1539
- .join('\n');
1540
-
1541
- const releaseNotes = `## ${pr.title}\n\n### Notable changes\n\n${releaseNotesChanges}\n\n${prBody}`;
1542
- core.setOutput('body', releaseNotes);
1543
-
1544
- // Format comment
1545
- const notableChangesFormatted = notableChanges
1546
- .map(line => `* ${line.replace(/^> -|^-/, '')}`)
1547
- .join('\n');
1548
-
1549
- const releaseNotesComment = `#release-notes ${pr.title}\n\nNotable changes\n* [only keep the important and rephrase, leaving this in place will avoid posting release notes]\n${notableChangesFormatted}\n\n${prBody}`;
1550
- core.setOutput('comment', releaseNotesComment);
1551
-
1552
- return releaseNotes;
1553
- }
1520
+ const renovateReleaseNotesMatch = pr.body.match(/### Release Notes([\s\S]*?)---/);
1521
+ console.log('renovateReleaseNotesMatch:', JSON.stringify(renovateReleaseNotesMatch, null, 2));
1522
+
1523
+ if (!isRenovate && renovateReleaseNotesMatch[1]) {
1524
+ const releaseNotesBody = renovateReleaseNotesMatch[1].trim();
1525
+
1526
+ console.log('releaseNotesBody:', releaseNotesBody);
1527
+
1528
+ // Extract notable changes
1529
+ const notableChanges = releaseNotesBody
1530
+ .split('\n')
1531
+ .filter(line => line.match(/^> -|^-|^<summary>/))
1532
+ .map(line => line.replace(/^<summary>(.*)<\/summary>/, '-$1'))
1533
+ .filter((line, index, self) => self.indexOf(line) === index)
1534
+ .slice(1);
1535
+
1536
+ // Format release notes
1537
+ const releaseNotesChanges = notableChanges
1538
+ .map(line => line.replace(/^> -(.*)/, ' -$1'))
1539
+ .join('\n');
1540
+
1541
+ console.log('releaseNotesChanges:', releaseNotesChanges);
1542
+
1543
+ const releaseNotes = `## ${pr.title}\n\n### Notable changes\n\n${releaseNotesChanges}\n\n${releaseNotesBody}`;
1544
+ core.setOutput('body', releaseNotes);
1545
+
1546
+ console.log('releaseNotes:', releaseNotes);
1547
+
1548
+ // Format comment
1549
+ const notableChangesFormatted = notableChanges
1550
+ .map(line => `* ${line.replace(/^> -|^-/, '')}`)
1551
+ .join('\n');
1552
+
1553
+ const releaseNotesComment = `#release-notes ${pr.title}\n\nNotable changes\n* [only keep the important and rephrase, leaving this in place will avoid posting release notes]\n${notableChangesFormatted}\n\n${releaseNotesBody}`;
1554
+ core.setOutput('comment', releaseNotesComment);
1555
+
1556
+ return releaseNotes;
1554
1557
}
1555
1558
1556
1559
// Handle custom release notes
0 commit comments