Skip to content

Commit 8493831

Browse files
committed
fix: the regex
Signed-off-by: exploreriii <133720349+exploreriii@users.noreply.github.com>
1 parent 9ea2c4b commit 8493831

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

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

1313
/**
14-
* Returns true if /assign appears in comment
14+
* Returns true if /assign appears as a standalone command in the comment
1515
*/
1616
function commentRequestsAssignment(body) {
1717
const matches =
1818
typeof body === 'string' &&
19-
/\b\/assign\b/i.test(body);
19+
/(^|\s)\/assign(\s|$)/i.test(body);
2020

2121
console.log('[gfi-assign] commentRequestsAssignment:', {
2222
body,

0 commit comments

Comments
 (0)