From e18823ca21d234f22ce5168d7951230adb540449 Mon Sep 17 00:00:00 2001 From: TomJGooding <101601846+TomJGooding@users.noreply.github.com> Date: Tue, 17 Mar 2026 23:14:07 +0000 Subject: [PATCH 1/2] ci: add `anti-slop` workflow for PRs Textual is starting to drown in AI-generated slop PRs. This adds the `anti-slop` Github Action to automatically close slop PRs: https://github.com/peakoss/anti-slop Despite this workflow claiming "sensible defaults", I've erred on the side of caution with the check rules. --- .github/workflows/pr-quality.yaml | 69 +++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 .github/workflows/pr-quality.yaml diff --git a/.github/workflows/pr-quality.yaml b/.github/workflows/pr-quality.yaml new file mode 100644 index 0000000000..616e5ec23c --- /dev/null +++ b/.github/workflows/pr-quality.yaml @@ -0,0 +1,69 @@ +name: PR Quality + +permissions: + contents: read + issues: read + pull-requests: write + +on: + pull_request_target: + types: [opened, reopened] + +jobs: + pr-quality: + runs-on: ubuntu-latest + steps: + - uses: peakoss/anti-slop@v0.2.1 + with: + # General Settings + max-failures: 2 + + # User Checks + min-account-age: 30 + max-daily-forks: 7 + + # PR Description Checks + require-linked-issue: true + + # PR Template Checks + # require-pr-template: false + # strict-pr-template-sections: "" + # optional-pr-template-sections: "" + # max-additional-pr-template-sections: 0 + + # PR Failure Actions + failure-pr-message: "https://github.com/Textualize/textual/blob/main/AI_POLICY.md" + close-pr: true + + ######################### + # DISABLE OTHER DEFAULTS + ######################### + + # PR Branch Checks + blocked-source-branches: "" + + # PR Quality Checks + require-maintainer-can-modify: false + + # PR Description Checks + require-description: false + max-description-length: 0 + max-emoji-count: 0 + max-code-references: 0 + + # Commit Message Checks + max-commit-message-length: 0 + require-commit-author-match: false + blocked-commit-authors: "" + + # File Checks + blocked-paths: "" + require-final-newline: false + max-added-comments: 0 + + # User Checks + detect-spam-usernames: false + min-profile-completeness: 0 + + # Merge Checks + min-global-merge-ratio: 0 From 9844112eca7c748e229a63aa22a5c8e444462fa0 Mon Sep 17 00:00:00 2001 From: TomJGooding <101601846+TomJGooding@users.noreply.github.com> Date: Thu, 19 Mar 2026 15:48:58 +0000 Subject: [PATCH 2/2] ci(anti-slop): restore `min-global-merge-ratio` check The merged/closed PR ratio is probably one of the most effective checks for users with a history of slop PRs, so I'm not sure what I was thinking when I disabled this check. --- .github/workflows/pr-quality.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-quality.yaml b/.github/workflows/pr-quality.yaml index 616e5ec23c..d60711818c 100644 --- a/.github/workflows/pr-quality.yaml +++ b/.github/workflows/pr-quality.yaml @@ -22,6 +22,9 @@ jobs: min-account-age: 30 max-daily-forks: 7 + # Merge Checks + min-global-merge-ratio: 30 + # PR Description Checks require-linked-issue: true @@ -64,6 +67,3 @@ jobs: # User Checks detect-spam-usernames: false min-profile-completeness: 0 - - # Merge Checks - min-global-merge-ratio: 0