ci: add guard against zero-change PRs (rubber-stamp prevention) #1738

Merged
Rockachopa merged 1 commits from step35/1445-process-prevent-rubber-stamp into main 2026-05-04 00:13:27 +00:00
Owner

Issue #1445 — Prevent rubber-stamping of PRs with no changes

Problem

PR #359 had 0 additions, 0 deletions, 0 changes but received 3 APPROVED reviews — rubber-stamping without actual review.

Solution (Option 1: CI Validation)

Add a gate that rejects PRs with zero file changes to the CI pipeline.

Implementation

  • Modified .gitea/workflows/ci.yml
  • Added new step "Guard: reject PRs with zero file changes" to the validate job
  • Runs immediately after checkout to fail fast
  • Uses git diff --name-only origin/main...HEAD | wc -l to count changed files
  • Fails with clear error message if count == 0

Verification

  • YAML syntax validated
  • Step runs before any expensive validation
  • Clear blocking message guides contributors

Closes

This PR closes #1445.

## Issue #1445 — Prevent rubber-stamping of PRs with no changes ### Problem PR #359 had 0 additions, 0 deletions, 0 changes but received 3 APPROVED reviews — rubber-stamping without actual review. ### Solution (Option 1: CI Validation) Add a gate that **rejects PRs with zero file changes** to the CI pipeline. ### Implementation - Modified `.gitea/workflows/ci.yml` - Added new step **"Guard: reject PRs with zero file changes"** to the `validate` job - Runs immediately after checkout to fail fast - Uses `git diff --name-only origin/main...HEAD | wc -l` to count changed files - Fails with clear error message if count == 0 ### Verification - YAML syntax validated - Step runs before any expensive validation - Clear blocking message guides contributors ### Closes This PR closes #1445.
Rockachopa added 1 commit 2026-04-30 22:58:42 +00:00
ci: add guard against zero-change PRs (rubber-stamp prevention)
Some checks failed
CI / test (pull_request) Failing after 1m53s
CI / validate (pull_request) Failing after 13s
Review Approval Gate / verify-review (pull_request) Failing after 13s
f7f96bc744
Add early-failing check to reject PRs with zero file changes.
This prevents the "rubber-stamping" problem where reviewers
approve empty diffs (0 additions, 0 deletions).

The check runs in the validate job immediately after checkout:
- Counts changed files via git diff --name-only origin/main...HEAD
- Fails if count is zero with clear error message
- Passes with confirmation if PR has real changes

Refs #1445. Addresses Option 1 (CI Validation) from issue triage.
Smallest concrete fix: one new step in existing CI workflow.

Closes #1445
Rockachopa requested review from perplexity 2026-04-30 22:58:43 +00:00
Rockachopa merged commit d4172cea70 into main 2026-05-04 00:13:27 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Timmy_Foundation/the-nexus#1738