diff --git a/.github/scripts/pr_list.mjs b/.github/scripts/pr_list.mjs index 8038a89..b7328e8 100644 --- a/.github/scripts/pr_list.mjs +++ b/.github/scripts/pr_list.mjs @@ -12,11 +12,15 @@ const historyFilePath = path.join(__dirname, '..', '..', 'HISTORY.md'); * @returns {string[]} */ function parsePRList(history) { - const prRegexp = /mongodb-legacy/issues\/(?\d+)\)/iu; - return history - .split('\n') - .map(line => prRegexp.exec(line)?.groups?.prNum ?? '') - .filter(prNum => prNum !== ''); + const prRegexp = /mongodb-legacy\/issues\/(?\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' });