Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: refine ci for spam detection #3295

Merged
merged 2 commits into from
Jan 9, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .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 All @@ -46,4 +46,4 @@ jobs:
ISSUE_NUMBER: ${{ github.event.issue.number }}
REPO_OWNER: ${{github.repository_owner }}
REPO_NAME: ${{ github.event.repository.name }}
SPAM_WORDS: ${{ github.secrets.SPAM_WORDS }}
SPAM_WORDS: ${{ secrets.SPAM_WORDS }}
Loading