Skip to content

Commit 7cbf65e

Browse files
authored
Merge pull request #5098 from nodejs/add-ai-spam-detector
Add AI spam detector
2 parents 3fcf6ec + 5f4e96b commit 7cbf65e

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/spam-detect.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: AI Moderator
2+
on:
3+
issues:
4+
types: [opened]
5+
issue_comment:
6+
types: [created]
7+
pull_request_review_comment:
8+
types: [created]
9+
10+
jobs:
11+
spam-detection:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
issues: write
15+
pull-requests: write
16+
models: read
17+
contents: read
18+
steps:
19+
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0
20+
- uses: github/ai-moderator@6bcdb2a79c2e564db8d76d7d4439d91a044c4eb6 # v1
21+
with:
22+
token: ${{ secrets.GITHUB_TOKEN }}
23+
spam-label: 'spam'
24+
ai-label: 'ai-generated'
25+
minimize-detected-comments: false
26+
# Built-in prompt configuration (all enabled by default)
27+
enable-spam-detection: true
28+
enable-link-spam-detection: true
29+
enable-ai-detection: true
30+
# custom-prompt-path: '.github/prompts/my-custom.prompt.yml' # Optional

0 commit comments

Comments
 (0)