Skip to content

Commit cd9ea80

Browse files
authored
Update AssignCommitter.yml
1 parent 3ca3e79 commit cd9ea80

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

.github/workflows/AssignCommitter.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080
8181
// Find lines that match ^(@[a-zA-Z0-9]+)(\s*#.*)?\n$ and extract the usernames
8282
// const regex = /^(@[a-zA-Z0-9]+)(\s*#.*)?\n$/; // TODO: Fix this regex.
83-
const regex = /^(.*?)$/;
83+
const regex = /^@(.*?)$/;
8484
const reviewer_candidates = fileContentsText
8585
.split('\n')
8686
.map(line => line.trim())
@@ -90,18 +90,19 @@ jobs:
9090
console.log('reviewer_candidates: ', reviewer_candidates);
9191
9292
if (reviewer_candidates.length < 1) {
93-
const error_msg = 'ERROR: Could not find any reviewer_candidates';
94-
console.error(error_msg);
95-
throw new Error(error_msg);
93+
const msg = 'ERROR: Could not find any reviewer_candidates';
94+
console.error(msg);
95+
throw new Error(msg);
9696
}
9797
98-
if (isCollaborator) {
98+
if (isCollaborator == true) {
9999
// The PR author is a committer, so we skip assigning them
100100
console.log('Skipping PR authored by committer: ', prAuthor);
101101
return;
102102
}
103103
104104
// Assign random committer
105+
return; // TODO: Delete this line.
105106
await github.rest.issues.addAssignees({
106107
owner: context.repo.owner,
107108
repo: context.repo.repo,

0 commit comments

Comments
 (0)