Skip to content

Commit

Permalink
ci: include http protocol when check if a link is external
Browse files Browse the repository at this point in the history
  • Loading branch information
Keith-CY committed Jan 9, 2025
1 parent 9d67256 commit 2409017
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/spam-comment-detection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
const issue_number = process.env.ISSUE_NUMBER
const owner = process.env.REPO_OWNER
const repo = process.env.REPO_NAME
const EXTERNAL_LINK_REGEXT = /https:\/\/(?!((\w+\.)?github\.com|github\.com|(\w+\.)?magickbase\.com|(\w+\.)?nervos\.org))/gi
const EXTERNAL_LINK_REGEXT = /https?:\/\/(?!((\w+\.)?github\.com|github\.com|(\w+\.)?magickbase\.com|(\w+\.)?nervos\.org))/gi
if (spam_words.some(w => comment.includes(w))) {
console.info(`Spam comment: ${comment}`)
github.rest.issues.deleteComment({ owner, repo, comment_id })
Expand Down

0 comments on commit 2409017

Please sign in to comment.