Skip to content

Add GitHub Action to warn on large PRs#115

Closed
aronchick wants to merge 1 commit intodlorenc:mainfrom
aronchick:multiclaude/gentle-otter
Closed

Add GitHub Action to warn on large PRs#115
aronchick wants to merge 1 commit intodlorenc:mainfrom
aronchick:multiclaude/gentle-otter

Conversation

@aronchick
Copy link
Copy Markdown
Contributor

Summary

  • Adds a new GitHub Actions workflow that monitors PR size
  • Comments on PRs with more than 10 files changed with a friendly warning
  • Helps encourage smaller, more reviewable pull requests

Implementation Details

The workflow:

  1. Triggers on pull_request events (opened and synchronize)
  2. Uses actions/github-script to query the PR's changed files
  3. If > 10 files, posts/updates a warning comment
  4. If reduced below threshold, removes the warning comment
  5. Uses HTML comment marker (<!-- large-pr-warning -->) to track its own comments

Test plan

  • Create a PR with < 10 files - verify no comment is posted
  • Create a PR with > 10 files - verify warning comment appears
  • Push additional commits to large PR - verify comment is updated (not duplicated)
  • Reduce large PR below threshold - verify warning is removed

🤖 Generated with Claude Code

@aronchick aronchick force-pushed the multiclaude/gentle-otter branch from bb48195 to 3167e14 Compare January 20, 2026 05:07
@dlorenc
Copy link
Copy Markdown
Owner

dlorenc commented Jan 20, 2026

This PR has merge conflicts. Please rebase on main to resolve them.

Adds a new workflow that comments on pull requests when they have more
than 10 files changed. This helps encourage smaller, more reviewable PRs.

Features:
- Triggers on PR open and synchronize events
- Posts a friendly warning comment when threshold exceeded
- Updates existing comment if PR is resync'd
- Removes warning if PR is reduced below threshold

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@aronchick aronchick force-pushed the multiclaude/gentle-otter branch from 3167e14 to 60f89f9 Compare January 20, 2026 05:09
@aronchick
Copy link
Copy Markdown
Contributor Author

Closing due to stale fork causing 8000+ line diff. The actual change is ~93 lines (just a GitHub Action). Will re-implement cleanly from upstream main.

@aronchick aronchick closed this Jan 20, 2026
@aronchick aronchick deleted the multiclaude/gentle-otter branch January 20, 2026 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants