From f693d9272d7f6fc31785da866e181e512f8e553b Mon Sep 17 00:00:00 2001 From: Salman Chishti <32169182+salmanmkc@users.noreply.github.com> Date: Mon, 3 Aug 2026 12:05:28 +0000 Subject: [PATCH 1/2] Add AI Moderator as an automation starter workflow Adds github/ai-moderator to the Automation category of the starter workflow gallery, alongside the existing Stale, Greetings, and Labeler templates. Any repository can now pick this from the Actions tab to scan new issues and comments for spam, link spam, and AI-generated content using the GitHub Models inference API (no extra secrets required, matching the existing AI issue summary template). Verified against script/validate-data locally: no errors. --- automation/ai-moderator.yml | 35 +++++++++++++++++++ .../properties/ai-moderator.properties.json | 6 ++++ 2 files changed, 41 insertions(+) create mode 100644 automation/ai-moderator.yml create mode 100644 automation/properties/ai-moderator.properties.json diff --git a/automation/ai-moderator.yml b/automation/ai-moderator.yml new file mode 100644 index 0000000000..45b69d73e4 --- /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@v4 + - 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"] +} From 93aa0f3c523150eb9892886ab3cf7f604afe002f Mon Sep 17 00:00:00 2001 From: Salman Chishti <32169182+salmanmkc@users.noreply.github.com> Date: Mon, 3 Aug 2026 12:10:57 +0000 Subject: [PATCH 2/2] Use latest actions/checkout in AI Moderator template Gallery templates are not covered by this repository's Dependabot configuration, which only scans .github/workflows, so pin to the current major version at authoring time. --- automation/ai-moderator.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automation/ai-moderator.yml b/automation/ai-moderator.yml index 45b69d73e4..09d5fc798b 100644 --- a/automation/ai-moderator.yml +++ b/automation/ai-moderator.yml @@ -23,7 +23,7 @@ jobs: models: read contents: read steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v7 - uses: github/ai-moderator@v1 with: token: ${{ secrets.GITHUB_TOKEN }}