Skip to content

Commit 9ea2c4b

Browse files
committed
fix: loosening the regex
Signed-off-by: exploreriii <[email protected]>
1 parent 4d3c046 commit 9ea2c4b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

.github/scripts/bot-gfi-assign-on-comment.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,12 @@ const UNASSIGNED_GFI_SEARCH_URL =
1111
/// HELPERS FOR ASSIGNING ///
1212

1313
/**
14-
* Returns true if /assign appears at the start of a line or comment
15-
* Optionally preceded or followed by whitespace
14+
* Returns true if /assign appears in comment
1615
*/
1716
function commentRequestsAssignment(body) {
1817
const matches =
1918
typeof body === 'string' &&
20-
/(^|\n)\s*\/assign(\s|$)/i.test(body);
19+
/\b\/assign\b/i.test(body);
2120

2221
console.log('[gfi-assign] commentRequestsAssignment:', {
2322
body,

0 commit comments

Comments
 (0)