Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions .github/scripts/pr_list.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,15 @@ const historyFilePath = path.join(__dirname, '..', '..', 'HISTORY.md');
* @returns {string[]}
*/
function parsePRList(history) {
const prRegexp = /mongodb-legacy/issues\/(?<prNum>\d+)\)/iu;
return history
.split('\n')
.map(line => prRegexp.exec(line)?.groups?.prNum ?? '')
.filter(prNum => prNum !== '');
const prRegexp = /mongodb-legacy\/issues\/(?<prNum>\d+)\)/iu;
return Array.from(
new Set(
history
.split('\n')
.map(line => prRegexp.exec(line)?.groups?.prNum ?? '')
.filter(prNum => prNum !== '')
)
);
}

const historyContents = await fs.readFile(historyFilePath, { encoding: 'utf8' });
Expand Down