53 lines
1.2 KiB
Markdown
53 lines
1.2 KiB
Markdown
# Rubber-Stamping Prevention
|
|
|
|
## What is Rubber-Stamping?
|
|
|
|
Rubber-stamping is approving a PR without actually reviewing the code. This was observed in PR #359 which received 3 APPROVED reviews despite having zero changes.
|
|
|
|
## Why It's Bad
|
|
|
|
1. Wastes reviewer time
|
|
2. Creates false sense of review quality
|
|
3. Allows zombie PRs to appear reviewed
|
|
|
|
## Prevention Measures
|
|
|
|
### 1. CI Check (`.gitea/workflows/check-pr-changes.yml`)
|
|
|
|
Automated check that runs on every PR:
|
|
- Detects PRs with no changes (0 additions, 0 deletions, 0 files changed)
|
|
- Blocks merge if PR is a zombie
|
|
- Provides clear error messages
|
|
|
|
### 2. PR Template
|
|
|
|
Enhanced reviewer checklist:
|
|
- Verify PR has actual changes
|
|
- Changes match description
|
|
- Code quality review
|
|
- Tests are adequate
|
|
- Documentation is updated
|
|
|
|
### 3. Zombie PR Detection
|
|
|
|
```bash
|
|
# Scan all repos
|
|
python bin/check_zombie_prs.py
|
|
|
|
# Scan specific repos
|
|
python bin/check_zombie_prs.py --repos the-nexus timmy-home
|
|
|
|
# Generate report
|
|
python bin/check_zombie_prs.py --report
|
|
```
|
|
|
|
## Testing
|
|
|
|
```bash
|
|
# Create a test PR with no changes
|
|
git checkout -b test/zombie-pr
|
|
git commit --allow-empty -m "test: empty commit"
|
|
git push origin test/zombie-pr
|
|
# Create PR — CI should fail
|
|
```
|