From b31e74e5d29a18591e2c07abc279e69d0a9e0e35 Mon Sep 17 00:00:00 2001 From: Daniel Chalef <131175+danielchalef@users.noreply.github.com> Date: Mon, 25 Aug 2025 07:25:07 -0700 Subject: [PATCH] feat: Add GitHub AI Moderator for automated spam detection (#856) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit feat: Add GitHub AI Moderator workflow Add simple workflow configuration for GitHub's AI Moderator action to automatically detect spam in issues and comments. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude --- .github/workflows/ai-moderator.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/ai-moderator.yml diff --git a/.github/workflows/ai-moderator.yml b/.github/workflows/ai-moderator.yml new file mode 100644 index 00000000..6acbe910 --- /dev/null +++ b/.github/workflows/ai-moderator.yml @@ -0,0 +1,30 @@ +name: AI Moderator +on: + issues: + types: [opened] + issue_comment: + types: [created] + pull_request_review_comment: + types: [created] + +jobs: + spam-detection: + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + models: read + contents: read + steps: + - uses: actions/checkout@v4 + - uses: github/ai-moderator@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + spam-label: 'spam' + ai-label: 'ai-generated' + minimize-detected-comments: true + # Built-in prompt configuration (all enabled by default) + enable-spam-detection: true + enable-link-spam-detection: true + enable-ai-detection: true + # custom-prompt-path: '.github/prompts/my-custom.prompt.yml' # Optional \ No newline at end of file