Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1985284

Browse filesBrowse files
Trotttargos
authored andcommitted
tools: use {N} for spaces in regex
Spaces are hard to count. Use {N} notation to indicate how many spaces in regular expressions in find-inactive-collaborators. PR-URL: #41295 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent d0d595f commit 1985284
Copy full SHA for 1985284

File tree

Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Open diff view settings
Collapse file

‎tools/find-inactive-collaborators.mjs‎

Copy file name to clipboardExpand all lines: tools/find-inactive-collaborators.mjs
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const authors = await runGitCommand(
4949
// Get all approving reviewers of landed commits during the time period.
5050
const approvingReviewers = await runGitCommand(
5151
`git log --since="${SINCE}" | egrep "^ Reviewed-By: "`,
52-
(line) => /^ Reviewed-By: ([^<]+)/.exec(line)[1].trim()
52+
(line) => /^ {4}Reviewed-By: ([^<]+)/.exec(line)[1].trim()
5353
);
5454

5555
async function getCollaboratorsFromReadme() {
@@ -72,7 +72,7 @@ async function getCollaboratorsFromReadme() {
7272
foundCollaboratorHeading = true;
7373
}
7474
if (line.startsWith(' **') && isCollaborator) {
75-
const [, name, email] = /^ \*\*([^*]+)\*\* <<(.+)>>/.exec(line);
75+
const [, name, email] = /^ {2}\*\*([^*]+)\*\* <<(.+)>>/.exec(line);
7676
const mailmap = await runGitCommand(
7777
`git check-mailmap '${name} <${email}>'`
7878
);
@@ -136,7 +136,7 @@ async function moveCollaboratorToEmeritus(peopleToMove) {
136136
if (line.startsWith('* ')) {
137137
collaboratorFirstLine = line;
138138
} else if (line.startsWith(' **')) {
139-
const [, name, email] = /^ \*\*([^*]+)\*\* <<(.+)>>/.exec(line);
139+
const [, name, email] = /^ {2}\*\*([^*]+)\*\* <<(.+)>>/.exec(line);
140140
if (peopleToMove.some((entry) => {
141141
return entry.name === name && entry.email === email;
142142
})) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.