docs(rulesets): note last-push approval needs a non-zero approval count - #12395
Draft
sileht wants to merge 1 commit into
Conversation
Contributor
Merge Protections🔴 2 of 6 protections blocking · waiting on 👀 reviews
🔴 👀 Review RequirementsWaiting for
This rule is failing.
🔴 🔎 ReviewsWaiting for
This rule is failing.
Show 4 satisfied protections🟢 🤖 Continuous Integration
🟢 Enforce conventional commitMake sure that we follow https://www.conventionalcommits.org/en/v1.0.0/
🟢 📕 PR description
🟢 🚦 Auto-queueWhen all merge protections are satisfied, this pull request will be queued automatically. |
There was a problem hiding this comment.
Pull request overview
Updates the GitHub rulesets documentation to accurately describe when Mergify injects the require_last_push_approval-equivalent merge condition, clarifying that it only happens when the rule also requires at least one approving review, and documenting the practical workaround.
Changes:
- Qualifies the “Require Approval of the Most Recent Push” section to require a non-zero required approval count.
- Adds a caution callout explaining the
required_approving_review_count: 0limitation and the bypass-actor scenario impact. - Updates the ruleset compatibility table to note the injection condition for
require_last_push_approval.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Mergify injects the last-push-approval condition only when the same rule also requires at least one approving review. With the required approval count at 0, GitHub reports no review decision for the pull request, so Mergify has nothing to mirror and skips the injection. The page promised the injection unconditionally, which is wrong wherever Mergify is allowed to bypass the rule: there the pull request merges with an unapproved latest push. Qualify the section and the `pull_request` row of the compatibility table, and point at the fix the reader controls, raising the required approval count to 1 or more. Fixes MRGFY-8699 Change-Id: I8b8b2260899a9251d1a9d2c65802b9adf7c9715a
sileht
force-pushed
the
devs/sileht/docs-last-push-approval-count-zero/note-last-push-approval-needs-non-zero-approval--8b8b2260
branch
from
August 15, 2026 16:09
d660756 to
494859c
Compare
Member
Author
Revision history
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mergify injects the last-push-approval condition only when the same rule also
requires at least one approving review. With the required approval count at 0,
the condition is not injected.
The page promised the injection unconditionally, which is wrong wherever
Mergify is allowed to bypass the rule: there the pull request merges with an
unapproved latest push. Qualify the section and the
pull_requestrow of thecompatibility table.
Also corrected in the same section
Mergify's implementation both key on whoever pushed the most recent commit,
which is also what the config schema says.
identically.
wrong product. Injection produces merge conditions, as this page's own
introduction says.
Framing
This states the limitation and what makes the condition get injected. It
deliberately does not promise that raising the approval count closes the hole,
because injection has other gates this page does not cover. Two alternatives
were considered and dropped:
.mergify.yml. It does evaluatecorrectly at count 0, but it is not an attribute users are meant to author.
opposite everywhere, so that is folded into the caveat as the reason the gap
is reachable, rather than presented as a fix.
Fixes MRGFY-8699