diff --git a/automation/ai-moderator.yml b/automation/ai-moderator.yml new file mode 100644 index 0000000000..09d5fc798b --- /dev/null +++ b/automation/ai-moderator.yml @@ -0,0 +1,35 @@ +# This workflow scans new issues and comments for spam, link spam, and +# AI-generated content using the GitHub Models inference API, then labels +# (and optionally minimizes) anything it detects. +# +# For more information, see: +# https://github.com/github/ai-moderator +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@v7 + - uses: github/ai-moderator@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + spam-label: 'spam' + ai-label: 'ai-generated' + minimize-detected-comments: true + enable-spam-detection: true + enable-link-spam-detection: true + enable-ai-detection: true diff --git a/automation/properties/ai-moderator.properties.json b/automation/properties/ai-moderator.properties.json new file mode 100644 index 0000000000..70221ad695 --- /dev/null +++ b/automation/properties/ai-moderator.properties.json @@ -0,0 +1,6 @@ +{ + "name": "AI Moderator", + "description": "Scans new issues and comments for spam, link spam, and AI-generated content", + "iconName": "octicon ai-model", + "categories": ["Automation", "SDLC"] +}