Browse Source

chore: update changelog script (#35916)

pull/35869/head
xrkffgg 3 years ago
committed by GitHub
parent
commit
d30388915f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      scripts/print-changelog.js

7
scripts/print-changelog.js

@ -35,7 +35,7 @@ const MAINTAINERS = [
'Rustin-Liu', 'Rustin-Liu',
'fireairforce', 'fireairforce',
'kerm1it', 'kerm1it',
'MadCcc', 'madccc',
].map(author => author.toLowerCase()); ].map(author => author.toLowerCase());
const cwd = process.cwd(); const cwd = process.cwd();
@ -47,7 +47,7 @@ function getDescription(entity) {
} }
const descEle = entity.element.find('td:last'); const descEle = entity.element.find('td:last');
let htmlContent = descEle.html(); let htmlContent = descEle.html();
htmlContent = htmlContent.replace(/<code>([^<]*)<\/code>/g, '`$1`'); htmlContent = htmlContent.replace(/<code class="notranslate">([^<]*)<\/code>/g, '`$1`');
return htmlContent.trim(); return htmlContent.trim();
} }
@ -179,6 +179,9 @@ async function printLog() {
if (str.toLowerCase().includes('fix') || str.includes('修复')) { if (str.toLowerCase().includes('fix') || str.includes('修复')) {
icon = '🐞'; icon = '🐞';
} }
if (str.toLowerCase().includes('feat')) {
icon = '🆕';
}
let authorText = ''; let authorText = '';
if (!MAINTAINERS.includes(author.toLowerCase())) { if (!MAINTAINERS.includes(author.toLowerCase())) {

Loading…
Cancel
Save