Skip to content

Commit 2409017

Browse files
committed
ci: include http protocol when check if a link is external
1 parent 9d67256 commit 2409017

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/spam-comment-detection.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
const issue_number = process.env.ISSUE_NUMBER
2525
const owner = process.env.REPO_OWNER
2626
const repo = process.env.REPO_NAME
27-
const EXTERNAL_LINK_REGEXT = /https:\/\/(?!((\w+\.)?github\.com|github\.com|(\w+\.)?magickbase\.com|(\w+\.)?nervos\.org))/gi
27+
const EXTERNAL_LINK_REGEXT = /https?:\/\/(?!((\w+\.)?github\.com|github\.com|(\w+\.)?magickbase\.com|(\w+\.)?nervos\.org))/gi
2828
if (spam_words.some(w => comment.includes(w))) {
2929
console.info(`Spam comment: ${comment}`)
3030
github.rest.issues.deleteComment({ owner, repo, comment_id })

0 commit comments

Comments
 (0)