Releases: peakoss/anti-slop
Releases · peakoss/anti-slop
v0.3.0
Immutable
release. Only release title and notes can be modified.
Added
maxChangedFilesandmaxChangedLinesoptions for new PR size checks that limit the number of changed files and changed lines (additions + deletions)requirePublicProfileoption that requires the PR author to have a public GitHub profileautofix-ci[bot]to default bot exemptions
Changed
- Reduced compiled action size
v0.2 v0.3 Reduction 51,478 lines (2.3 MB) 20,815 lines (0.9 MB) 60% maxDailyForksdefault from7to6- Reduce spam username consecutive digit threshold from 4 to 2
- Remove
public profilefrom profile completeness signals (now a separaterequirePublicProfilecheck) - Read
ownerandrepofrom the webhook payload instead of theGITHUB_REPOSITORYenv var, aligning with how all other context data is read, preparing for a future ecosystem CI and simplifying local testing (no need to edit the.envfile all the time)
Fixed
- Skip merge checks when the user profile is private, since merge data cannot be computed for private profiles
- Set
resultoutput topassedwhen check failures do not reachmaxFailures(previously the output was unset)
Refactored
- Convert
Inputenum to aconstobject - Switch to
Number.isNaNto avoid type coercion
Maintenance
- Cleanup input descriptions, add missing valid ranges and v0.3 changes to README
- Add v0.2 and v0.3 changes to
.env.example - Align test event fixtures with
context.ts - Switch indentation from spaces to tabs
- Reorganize and harden
tsconfig.json - Add
bunfig.tomlwith hardened bun install settings - Upgrade all dependencies
- Update tsdown dependency bundling config syntax
- Add tsx to
devDependenciesto make local testing work with bunlinker = "isolated" - Add
@types/nodetodevDependencies - Move
@octokit/webhooks-typestodevDependencies - Add import sorting to prettier
- Add
checkandtest:allscripts topackage.json - Add caching to eslint and prettier
- Improve eslint rule comment
- Simplify and consolidate
.gitignore - Add branch and commit ahead prerequisite checks to the release script
- Improve
.prettierignore
Issues
- Fixes #7
v0.2.1
Immutable
release. Only release title and notes can be modified.
Fixed
- Inherited files from the default branch incorrectly included in file checks. When the PR targets a branch other than the default (e.g.
next), files the target branch hasn't caught up to yet were incorrectly also evaluated, causing false positives on file checks. - Multiline comments counted as individual comments
- Shortcode emojis not counted by the emoji check
- Checkboxes inside blockquotes not detected by the PR template check, which could cause checkbox-based checks to pass when they should not
- Missing strict sections passes the
strictPrTemplateSectionscheck - Duplicated "Missing section" prefix in the template check info message
Refactored
- Extract inherited data detection out of the commit checks so both commit and file checks share a single comparison call
v0.2.0
Immutable
release. Only release title and notes can be modified.
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
v0.1.1
Immutable
release. Only release title and notes can be modified.
Fixed
- False positives in the blocked terms check by stripping comments from the description body before evaluation. A honeypot term placed inside a comment would always trigger a failure if the user did not remove the comment.
v0.1.0
Immutable
release. Only release title and notes can be modified.
Initial release with 15 checks covering PR title, description, commits, user health and more.
Added
max-failuressetting to control how many check failures trigger failure actions- Branch checks:
allowed-target-branches,blocked-target-branches,allowed-source-branches,blocked-source-branches - Title checks:
require-conventional-title - Description checks:
require-description,max-description-length,max-emoji-count,require-pr-template,require-linked-issue,blocked-terms,blocked-issue-numbers - Commit checks:
require-conventional-commits,blocked-commit-authors - File checks:
allowed-file-extensions,allowed-paths,blocked-paths,require-final-newline - User checks:
min-repo-merged-prs,min-repo-merge-ratio,min-global-merge-ratio,global-merge-ratio-exclude-own,min-account-age - Quality checks:
max-negative-reactions,require-maintainer-can-modify - Exemptions:
exempt-author-association,exempt-users,exempt-bots,exempt-draft-prs,exempt-label,exempt-pr-label,exempt-milestones,exempt-pr-milestones,exempt-all-milestones,exempt-all-pr-milestones - Success actions:
success-add-pr-labels - Failure actions:
failure-remove-pr-labels,failure-remove-all-pr-labels,failure-add-pr-labels,failure-pr-message,close-pr,lock-pr,delete-branch - Outputs:
total-checks,failed-checks,passed-checks,result