File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import assert from 'node:assert';
66import { open } from 'node:fs/promises';
77import { argv } from 'node:process';
88
9- const ghHandleLine = /^\* \[(.+)\]\(https:\/\/github\.com\/\1 \) -$/;
9+ const ghHandleLine = /^\* \[(.+)\]\(https:\/\/github\.com\/(.+) \) -$/;
1010const memberInfoLine = /^ {2}\*\*[^*]+\*\* <<[^@]+@.+\.[a-z]+>>( \(\w+(\/[^)/]+)+\))?( - \[Support me\]\(.+\))?$/;
1111
1212const lists = {
@@ -59,9 +59,11 @@ for await (const line of readme.readLines()) {
5959 );
6060 }
6161
62- if (!ghHandleLine.test(line)) {
63- throw new Error(`${currentGithubHandle} is not formatted correctly (README.md:${lineNumber})`);
62+ const match = line.match(ghHandleLine);
63+ if (!match) {
64+ throw new Error(`${line} should match ${ghHandleLine} (README.md:${lineNumber})`);
6465 }
66+ assert.strictEqual(match[1], match[2], `GitHub handle does not match the URL (README.md:${lineNumber})`);
6567
6668 if (
6769 currentList === 'TSC voting members' ||
You can’t perform that action at this time.
0 commit comments