Approve stale lead maintainer PRs#22818
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a scheduled GitHub Actions workflow plus supporting Ruby script and documentation updates to automatically approve certain stale PRs authored by Homebrew lead maintainers in Homebrew/brew, when a defined set of safety requirements are met (non-fork PR, recent maintainer approval activity, Copilot review, no human review for 24h, and fully green CI).
Changes:
- Add a scheduled/dispatchable workflow to evaluate and (when eligible) approve stale lead maintainer PRs, plus a “report” mode for auditing.
- Add a Ruby automation script that gathers PR facts (reviews, CI status, changed files) and posts an approval/reports with a documented rationale.
- Document the new exception/behavior in relevant security and maintainer docs.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
docs/Supply-Chain-Security.md |
Documents the new narrow automatic-approval exception in the supply-chain model. |
docs/Maintainer-Guidelines.md |
Notes the existence/constraints of the stale lead maintainer auto-approval workflow. |
docs/Homebrew-brew-Maintainer-Guide.md |
Describes when and how stale lead maintainer PRs may be auto-approved. |
.github/workflows/approve-stale-lead-maintainer-prs.yml |
Introduces scheduled + manual workflow to approve/report on eligible PRs. |
.github/scripts/approve_stale_lead_maintainer_prs.rb |
Implements eligibility checks and posts approval/report bodies via GitHub API. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
05917dc to
b213e7f
Compare
bf518ae to
1edd0eb
Compare
1edd0eb to
a348fae
Compare
woodruffw
left a comment
There was a problem hiding this comment.
This makes sense to me, although my 0.02c would be for:
- A 48h weekday window instead (24h seems like it might be a little too short, particularly if a PR would have one specific maintainer as its reviewer).
- Additional restrictions on auto-approvals if the PR's diff touches CI/CD or other sensitive files. I think those kinds of changes ideally always involve explicit two person operation 🙂
I'm also in favour of setting this to 48h for the initial implementation. |
a348fae to
5d96ae1
Compare
5d96ae1 to
0bf15e7
Compare
|
The cooldown time didn't work correctly here - #22848 (review) |
|
@bevanjkay yup thanks on it |
0bf15e7 to
8af15a7
Compare
- Add scheduled approval for trusted stale lead maintainer PRs - Move approval checks into a `utils/github` Ruby script - Short-circuit API reads once approval is impossible - Require stale PRs to be open 48 hours without review - Permit recent approval evidence from fork PRs - Refuse to auto-approve sensitive paths - Use event type for branch push reports - Document the supply-chain guardrails and maintainer behaviour
8af15a7 to
2412d42
Compare
Add a scheduled workflow to approve stale lead maintainer PRs when all
approval requirements are met.
Require the PR to be:
This will:
brewcommands to reproduce the bug?brew lgtm(style, typechecking and tests) locally?OpenAI Codex 5.5 high with local review and much tweaking.