Merge pull request #37 from lawrence-mil/main

Add Anti Slop GitHub Action for pull request quality checks
This commit is contained in:
webadderall
2026-03-17 16:53:41 +11:00
committed by GitHub
2 changed files with 99 additions and 0 deletions
+61
View File
@@ -0,0 +1,61 @@
name: PR Quality
on:
pull_request_target:
types: [opened, reopened, edited, synchronize]
permissions:
contents: read
issues: read
pull-requests: write
jobs:
anti-slop:
runs-on: ubuntu-latest
steps:
- uses: peakoss/anti-slop@85daca1880e9e1af197fc06ea03349daf08f4202
with:
max-failures: 4
require-description: true
max-description-length: 2000
max-emoji-count: 2
max-code-references: 5
max-commit-message-length: 300
require-commit-author-match: true
min-account-age: 30
min-profile-completeness: 4
min-global-merge-ratio: 30
max-daily-forks: 7
detect-spam-usernames: true
blocked-source-branches: |
main
master
blocked-terms: |
ignore previous instructions
you are a helpful AI
as an AI language model
exempt-draft-prs: true
exempt-bots: |
dependabot[bot]
renovate[bot]
github-actions[bot]
exempt-author-association: OWNER,MEMBER,COLLABORATOR
success-add-pr-labels: checked
failure-add-pr-labels: slop
failure-pr-message: |
⚠️ This pull request has been flagged by **Anti-Slop**.
Our automated checks detected patterns commonly associated with
low-quality or automated/AI submissions (failure count reached).
No automatic closure — a maintainer will review it.
If this is legitimate work, please add more context, link issues, or ping us.
close-pr: false
+38
View File
@@ -0,0 +1,38 @@
name: Auto Translate to zh-CN
on:
push:
branches: [main]
paths:
- "*.md"
permissions:
contents: write
models: read
jobs:
translate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/cache@v4
with:
path: .genaiscript/cache/**
key: translation-cache-${{ github.run_id }}
restore-keys: translation-cache-
- uses: pelikhan/action-continuous-translation@v0.2.11
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
source: en
lang: zh
files: "*.md;README.md;CONTRIBUTING.md;TRANSLATION_GUIDE.md;CLAUDE.md"
filename_template: "{{ base }}.zh-CN{{ ext }}"
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "docs(zh-CN): auto-translate updates"
file_pattern: "*.zh-CN.md"