Conversation
This workflow will close PRs that have binary (executables) and archive files. It also rejects the PR if the changes include meta files specific to other programming language ecosystems. It will accept image graphic files (which are treated as binary) though.
Improves upon @prjctimg's work in #793. - Add permissions block for pull-requests: write - Add fetch-depth: 0 for full git history - Add step to fetch base branch before diff - Use github.base_ref instead of hardcoded origin/main - Fix multiline grep pattern (single line now) - Fix MIME type extraction using file --mime-type -b - Fix SVG mime type to svg+xml - Add GH_TOKEN env for gh pr close command - Use ::error:: annotations for better GitHub UI integration
Block by extension: - .exe, .dll (Windows binaries) - .out (Go coverage) - .ezdb, .db, .sqlite, .sqlite3 (databases) Block folders: - .idea/, .vs/ (IDE junk) - __pycache__/ (Python) Block OS junk: - Thumbs.db, Desktop.ini, .DS_Store
SchoolyB
added a commit
that referenced
this pull request
Apr 3, 2026
ci: add PR sanity check workflow
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a GitHub Actions workflow that automatically rejects PRs containing:
Based on @prjctimg's work in #793, with fixes applied to make the workflow functional.
Changes from #793
permissionsblock forpull-requests: writefetch-depth: 0for full git history accessorigin/maintoorigin/${{ github.base_ref }}svg+xml)GH_TOKENenv variable forgh pr close::error::annotations for GitHub Actions UICloses #793