GitHub Auto-Guardian is an automated code quality maintenance system for GitHub repositories. It automatically detects and fixes code issues, prevents merging of broken code, and alerts you to problems that require human intervention.
# Copy the .github folder to your project
cp -r .github/ /path/to/your/project/
# Install dependencies
pip install -r .github/scripts/requirements.txt
Go to your GitHub repository settings:
Auto-Guardian Quality Gate to the required checksCreate a pull request with some code quality issues to see the system in action.
.github/
├── workflows/
│ └── auto-maintenance.yml # Main GitHub Actions workflow
├── scripts/
│ ├── auto-fix.sh # Auto-fix script
│ ├── code-analyzer.py # Code analysis script
│ ├── report-generator.py # Report generation script
│ └── requirements.txt # Python dependencies
└── configs/
├── .eslintrc.json # ESLint configuration
├── .prettierrc # Prettier configuration
└── pyproject.toml # Python tools configuration
python .github/scripts/code-analyzer.py
bash .github/scripts/auto-fix.sh
python .github/scripts/report-generator.py --scan-results scan-results.json
The system analyzes your code using multiple tools:
The system automatically fixes issues that are safe to correct:
All changes must pass strict quality checks:
The system provides clear feedback:
Edit the configuration files to customize behavior:
.eslintrc.json - ESLint rules.prettierrc - Prettier formatting rulespyproject.toml - Python tool settings.github/workflows/auto-maintenance.yml - CI/CD pipelinecode-analyzer.pyauto-fix.shfixable: false# noqa comments in codeMIT License - feel free to use this in your projects.
For issues and feature requests, please open a GitHub issue.