GitHub's missing spam blocker. The rules based GitHub App that closes and deletes spam Issues, PRs, and comments
You can install RepoGuard from the GitHub Marketplace
RepoGuard is a customisable GitHub App designed to automatically manage and block spam in your repositories. By leveraging a set of configurable rules, RepoGuard helps maintain the quality of issues, pull requests, and comments, saving you time triaging and managing contributions.
- Automatically close and lock spam Issues & Pull Requests
- Configurable spam filter rules from .yml files in your project
- Block problematic users
- Block unwated/offensive words
- Block PRs that only update README files
- Block new GitHub accounts
- Block PRs below a minimum lines changed threshold
- Block contributions that contain any URLs
- Comments on closed Issues and PRs reminding contributors of the rules
RepoGuard comes with a sensible set of default rules to block low quality contributions.
You can configure your own rules by creating a YML file in your repo at .github/repo-guard.yml.
enabled: true
blockWordList: "block-word-list.txt"
blockWordListB64: block-word-list-base64.txt
blockUserList: block-user-list.txt
issues:
minWords: 5
blockAllCaps: false
commentOnClose: "This issue has been automatically flagged as low quality/spam, and closed as a result."
lockOnClose: false
lockReason: "spam"
blockWords: false
blockUsers: false
blockUrls: true
pullRequests:
minLinesChanged: 0
blockReadMeOnly: false
commentOnClose: "This PR has been automatically flagged as low quality/spam, and closed as a result."
lockOnClose: false
lockReason: "off-topic"
blockUsers: false
blockUrls: true
comments:
blockUsers: falseYou can read the full documentation for each option here
RepoGuard is built with Probot. For more info see: https://probot.github.io/docs/
For local development, pull this repo and install dependencies
npm installSet APP_ID, WEBHOOK_SECRET, PRIVATE_KEY and WEBHOOK_PROXY_URL environment variables in .env file.
See probot.github.io/docs/configuration/ for more details.
See example file .env.example
Run App locally
npm startRun tests
npm run test# 1. Build container
docker build -t repo-guard .
# 2. Start container
docker run -e APP_ID=<app-id> -e PRIVATE_KEY=<pem-value> repo-guardContributions are welcome! We'd also love to hear what features/config options would be helpful for you! If you have suggestions, please open an issue or submit a pull request. Please read the contributing guide before submitting.
ISC © 2024 b4lch