anti-slop
Version updated for https://github.com/peakoss/anti-slop to version v0.2.0.
- This action is used across all versions by 29 repositories.
Action Type
This is a Node action using Node version 24.
Go to the GitHub Marketplace to find the latest changes.
Action Summary
Anti Slop is a GitHub Action designed to detect and automatically close low-quality or AI-generated pull requests (PRs) by applying 31 battle-tested checks across various aspects of PRs, such as branches, titles, descriptions, commits, and contributor history. It helps open-source maintainers save time by preventing these PRs from reaching the review stage, while remaining language-agnostic and configurable with sensible defaults. The action facilitates maintaining open contributions without penalizing legitimate or AI-assisted quality contributions.
Release notes
Adds 9 new checks that cover more than 20 quality signals.
Breaking Changes
- Remove
deleteBranchoption as it requirescontent: writepermissions and does not work on forks - Set sensible maximums for all integer input options
Added
requireCommitAuthorMatchoption that matches the PR author against each commit author, catching commits authored solely by AI and commits not linked to a GitHub accountmaxCommitMessageLengthoption to catch AI stuffing a lot of text into commit messages- 3 new user checks:
detectSpamUsernames,maxDailyForksandminProfileCompletenessdetectSpamUsernames: flags usernames matching common spam patterns (all digits, 4+ consecutive digits, contains-aiorai-)maxDailyForks: checks the number of repositories forked by the user in any 24-hour windowminProfileCompleteness: checks 11 profile signals (public profile,name,company,blog,location,email,hireable,bio,twitter,followers,following) against a configurable minimum
- 3 new settings for the PR template check:
strictPrTemplateSections,optionalPrTemplateSectionsandmaxAdditionalPrTemplateSectionsstrictPrTemplateSections: classifies sections where all checkboxes must be present and checkedoptionalPrTemplateSections: classifies sections that can be entirely removed without failingmaxAdditionalPrTemplateSections: limit extra sections not defined in the template
maxCodeReferencesoption to limit the number of code references (file paths, function calls, method calls) in the PR descriptionmaxAddedCommentsoption to limit the number of comments added in all changed files
Changed
- Use
authorAssociationinstead of the search API whenminRepoMergedPrsis1for improved performance max-failuresdefault from3to4maxDescriptionLengthdefault from0to2500minAccountAgedefault from7to30- Improve and streamline check info messages
Fixed
- Exclude inherited default-branch commits from commit checks. Commits from the repo’s default branch (e.g.
main) that the base (target) branch (e.g.next) of the PR hasn’t caught up to yet are now excluded to avoid false positives, since these commits are already integrated. - Use
headShainstead ofheadBranchfor the newline check because if the PR is from a fork, the head branch name only exists in the fork repo and causes a404error when fetching file content against the base repo
Refactored
- Run user merge checks as a separate group
- Run PR template checks as a separate group
- Make description checks synchronous (no longer require the GitHub API) after extracting the PR template checks into their own group
- Replace short variables with full-length ones
- Streamline
action.yamlinput descriptions
Maintenance
@typescript-eslint/consistent-generic-constructorsrule set totype-annotationfor compatibility withisolatedDeclarations- Add debug logging to excluded commits
- Update readme with new and removed options
- Update total number of checks
- Remove
node_modulesand do a fresh install before building in the release script - Show build time and suppress the default git tag message in the release script
- Add missing payload fields to test events
- Add real user test event