Rulesets: exclude pull request contributors' approvals from merge requirements #204869
Replies: 2 comments
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
|
With AI review bots now, it would be really great to exclude them from being a required approver. The workaround is to make a team that is required to review. But that is annoying because it notifies everyone. GitHub copilot is ignored by a special case, would be nice if third-party agents get the same support. |
Uh oh!
There was an error while loading. Please reload this page.
🏷️ Discussion Type
Product Feedback
Body
Feature request for Rulesets: exclude pull request contributors' approvals from merge requirements
Summary
Add a pull-request ruleset property that prevents approvals from pull request contributors from satisfying required-review rules.
For example:
{ "type": "pull_request", "parameters": { "required_approving_review_count": 1, "exclude_contributor_approvals": true } }An alternative UI label could be:
Problem
GitHub prevents a pull request author from approving their own pull request. However, the pull request author and the people contributing commits are not always the same identities.
This is common for pull requests opened by GitHub Apps and automation accounts. A human can add commits to a bot-authored pull request and then approve it. GitHub counts that approval because the bot is the pull request author, allowing the person who contributed the change to satisfy the review requirement.
This behavior affects pull requests created by development agents, dependency bots, migration tools, and other GitHub Apps.
The existing ruleset options do not express the required policy:
Proposed behavior
Add
exclude_contributor_approvalsto the pull-request rule parameters for repository, organization, and enterprise rulesets.When enabled:
required_approving_review_count.A contributor should include any GitHub user associated with the author or committer of a commit in the current pull request. GitHub may also include authenticated users who pushed the pull request commits where that identity is available.
Expected behavior
Motivation
Organizations increasingly use automation to create pull requests while humans continue, amend, or replace the proposed changes. Review policy should follow who contributed the code, not only which account opened the pull request.
This property would close that gap without imposing the unrelated requirement that every push or rebase receive a new approval.
All reactions