Skip to content

Commit a6be675

Browse files
authored
ci: refine ci for spam detection (nervosnetwork#3295)
1 parent 9198e8b commit a6be675

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
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 })
@@ -46,4 +46,4 @@ jobs:
4646
ISSUE_NUMBER: ${{ github.event.issue.number }}
4747
REPO_OWNER: ${{github.repository_owner }}
4848
REPO_NAME: ${{ github.event.repository.name }}
49-
SPAM_WORDS: ${{ github.secrets.SPAM_WORDS }}
49+
SPAM_WORDS: ${{ secrets.SPAM_WORDS }}

0 commit comments

Comments
 (0)