reduce triggers when unneeded (#3915)

This commit is contained in:
Dane Evans 2025-12-06 20:55:40 +11:00 committed by GitHub
parent fd02f72caf
commit 689c53fbc3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 17 additions and 7 deletions

View file

@ -14,6 +14,7 @@ permissions:
jobs:
quality-check:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'issues' || (github.event_name == 'pull_request' && github.event.pull_request.labels == null || !contains(join(github.event.pull_request.labels.*.name, ','), 'automation')) }}
steps:
- name: Detect spam or low-quality content
uses: actions/ai-inference@v2
@ -28,7 +29,7 @@ jobs:
Respond with one of: spam, ai-generated, needs-review, or ok
system-prompt: You detect spam and low-quality contributions. Be conservative - only flag obvious spam or AI slop.
model: openai/gpt-4o-mini
temperature: 0.1
# temperature: 0.1
- name: Apply label if needed
if: steps.ai.outputs.response != 'ok'