Skip to content

fix(docs): simplify ruleset bypass guidance to one recommendation - #12362

Merged
mergify[bot] merged 1 commit into
mainfrom
devs/kozlek/thomasberdy/mrgfy-8578-document-merge-queue-support-for-github-native-stacked-pull/correct-what-ruleset-bypass-mode-changes--afcbdb19
Aug 13, 2026
Merged

fix(docs): simplify ruleset bypass guidance to one recommendation#12362
mergify[bot] merged 1 commit into
mainfrom
devs/kozlek/thomasberdy/mrgfy-8578-document-merge-queue-support-for-github-native-stacked-pull/correct-what-ruleset-bypass-mode-changes--afcbdb19

Conversation

@kozlek

@kozlek kozlek commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

The page explained how the three bypass modes interact with condition
injection, which a reader does not need in order to configure Mergify. It
also got that explanation wrong: it claimed exempt makes Mergify skip
injection, which is no longer what the engine does.

Say what to configure instead: add Mergify as a bypass actor and set the mode
to exempt, everywhere the page used to recommend always. That also covers
GitHub-native stacked pull requests, which need exempt specifically, so one
recommendation now fits every case.

Rename the section to "Bypass Actors" now that it no longer covers injection,
and point it at the step-by-step section further down.

Part of MRGFY-8578

@kozlek

kozlek commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

This pull request is part of a Mergify stack:

# Pull Request Link
1 fix(docs): simplify ruleset bypass guidance to one recommendation #12362 👈
2 feat(docs): document Merge Queue support for GitHub-native stacks #12361

@mergify
mergify Bot had a problem deploying to Mergify Merge Protections August 12, 2026 11:41 Failure
@mergify

mergify Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Merge Protections

🟢 All 6 merge protections satisfied — ready to merge.

Show 6 satisfied protections

🟢 🤖 Continuous Integration

  • all of:
    • check-success = build
    • check-success = lint
    • check-success = test
    • any of:
      • check-success = test-broken-links
      • label = ignore-broken-links
    • any of:
      • check-success=Cloudflare Pages
      • -head-repo-full-name~=^Mergifyio/

🟢 👀 Review Requirements

  • any of:
    • #approved-reviews-by >= 2
    • author = dependabot[bot]
    • all of:
      • author = mergify-ci-bot
      • -head ~= ^docs-agent/

🟢 Enforce conventional commit

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|internal|docs|style|refactor|perf|test|build|ci|chore|revert|ui)(?:\(.+\))?!?:

🟢 🔎 Reviews

  • #changes-requested-reviews-by = 0
  • #review-requested = 0
  • #review-threads-unresolved = 0

🟢 📕 PR description

  • body ~= (?ms:.{48,})

🟢 🚦 Auto-queue

When all merge protections are satisfied, this pull request will be queued automatically.

@mergify
mergify Bot requested a review from a team August 12, 2026 11:42
Comment thread src/content/docs/merge-queue/github-rulesets.mdx Outdated
@mergify
mergify Bot requested a review from a team August 12, 2026 12:02
Comment thread src/content/docs/merge-queue/github-rulesets.mdx Outdated
Comment thread src/content/docs/merge-queue/github-rulesets.mdx Outdated
Comment thread src/content/docs/merge-queue/github-rulesets.mdx Outdated
@mergify
mergify Bot requested a review from a team August 12, 2026 12:03
@kozlek
kozlek force-pushed the devs/kozlek/thomasberdy/mrgfy-8578-document-merge-queue-support-for-github-native-stacked-pull/correct-what-ruleset-bypass-mode-changes--afcbdb19 branch from 6525eed to a1c8491 Compare August 12, 2026 13:42
Copilot AI lite review requested due to automatic review settings August 12, 2026 13:42
@kozlek
kozlek force-pushed the devs/kozlek/thomasberdy/mrgfy-8578-document-merge-queue-support-for-github-native-stacked-pull/document-merge-queue-support-github-native-stacks--81d627f9 branch from e02a01c to 437c891 Compare August 12, 2026 13:42
@kozlek

kozlek commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

Revision history

# Type Changes Reason Date
1 initial 6525eed 2026-08-12 13:42 UTC
2 content 6525eed → a1c8491 2026-08-12 13:42 UTC
3 content a1c8491 → c8cec50 2026-08-12 13:54 UTC
4 content c8cec50 → 0714c93 2026-08-12 13:59 UTC
5 content 0714c93 → 7f215a4 2026-08-12 14:12 UTC
6 content 7f215a4 → 83b0f8d 2026-08-12 16:36 UTC
7 content 83b0f8d → f0af7cd 2026-08-12 16:48 UTC
8 content f0af7cd → fd6c677 2026-08-12 17:02 UTC

@mergify
mergify Bot had a problem deploying to Mergify Merge Protections August 12, 2026 13:42 Failure

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the GitHub Rulesets Compatibility documentation to reflect how Mergify behaves with GitHub ruleset bypass modes, especially for GitHub-native stacked pull requests that merge via GitHub’s stack merge API.

Changes:

  • Rewrites the “Bypass Actors and Injection” guidance to recommend exempt and clarify how bypass mode relates to rule injection.
  • Adds a new “Known Incompatibilities” entry explaining why stacked PR merges require exempt on applicable rulesets.
  • Updates the “Configuring Mergify as a Bypass Actor” steps to align with the revised recommendation and cross-link the rationale.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/content/docs/merge-queue/github-rulesets.mdx Outdated
Comment thread src/content/docs/merge-queue/github-rulesets.mdx Outdated
@kozlek
kozlek changed the base branch from devs/kozlek/thomasberdy/mrgfy-8578-document-merge-queue-support-for-github-native-stacked-pull/document-merge-queue-support-github-native-stacks--81d627f9 to main August 12, 2026 13:55
@kozlek
kozlek force-pushed the devs/kozlek/thomasberdy/mrgfy-8578-document-merge-queue-support-for-github-native-stacked-pull/correct-what-ruleset-bypass-mode-changes--afcbdb19 branch from a1c8491 to c8cec50 Compare August 12, 2026 13:55
@mergify
mergify Bot had a problem deploying to Mergify Merge Protections August 12, 2026 13:55 Failure
@kozlek
kozlek force-pushed the devs/kozlek/thomasberdy/mrgfy-8578-document-merge-queue-support-for-github-native-stacked-pull/correct-what-ruleset-bypass-mode-changes--afcbdb19 branch from c8cec50 to 0714c93 Compare August 12, 2026 13:59
@mergify
mergify Bot had a problem deploying to Mergify Merge Protections August 12, 2026 14:00 Failure
@kozlek
kozlek force-pushed the devs/kozlek/thomasberdy/mrgfy-8578-document-merge-queue-support-for-github-native-stacked-pull/correct-what-ruleset-bypass-mode-changes--afcbdb19 branch from 0714c93 to 7f215a4 Compare August 12, 2026 14:12
@mergify
mergify Bot had a problem deploying to Mergify Merge Protections August 12, 2026 14:12 Failure
@kozlek
kozlek marked this pull request as ready for review August 12, 2026 14:59
Comment thread src/content/docs/merge-queue/github-rulesets.mdx Outdated
@mergify
mergify Bot requested a review from a team August 12, 2026 16:20
@kozlek
kozlek force-pushed the devs/kozlek/thomasberdy/mrgfy-8578-document-merge-queue-support-for-github-native-stacked-pull/correct-what-ruleset-bypass-mode-changes--afcbdb19 branch from 7f215a4 to 83b0f8d Compare August 12, 2026 16:36
@mergify
mergify Bot had a problem deploying to Mergify Merge Protections August 12, 2026 16:37 Failure
jd
jd previously approved these changes Aug 12, 2026
@mergify
mergify Bot requested a review from a team August 12, 2026 16:43
@kozlek kozlek changed the title fix(docs): correct what a ruleset bypass mode changes fix(docs): simplify ruleset bypass guidance to one recommendation Aug 12, 2026
@kozlek
kozlek force-pushed the devs/kozlek/thomasberdy/mrgfy-8578-document-merge-queue-support-for-github-native-stacked-pull/correct-what-ruleset-bypass-mode-changes--afcbdb19 branch from 83b0f8d to f0af7cd Compare August 12, 2026 16:48
@mergify
mergify Bot dismissed jd’s stale review August 12, 2026 16:48

Pull request has been modified.

@mergify
mergify Bot had a problem deploying to Mergify Merge Protections August 12, 2026 16:48 Failure
@kozlek

kozlek commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

Removed that clause, and took the simplification further across the page per your steer — the reader should not need to know how the system works, only what to set.

  • Bypass Actors section is now two sentences: add Mergify as a bypass actor, set the mode to exempt. The three-mode descriptions are gone.
  • Step 5 of the setup steps is now just "Choose Exempt as the bypass mode."
  • The GitHub-native stacks note drops the merge-API explanation and states the requirement plus what happens without it.
  • Branch Name Pattern loses the pull_requests_only aside.
  • always and pull_requests_only no longer appear anywhere on the page.

Two consequences worth knowing:

  1. I renamed the section to Bypass Actors, since it no longer covers injection. That changes its anchor from #bypass-actors-and-injection to #bypass-actors. Nothing in the docs repo linked the old one, but the published configuration schema links it twice (https://docs.mergify.com/merge-queue/github-rulesets/#bypass-actors-and-injection), so those two fragments need updating engine-side. They still land on the right page in the meantime.

  2. The page no longer says anything about what a bypass mode does to condition injection, in either direction. The incorrect claim is gone, which was the point, but so is the correction. Flagging in case support starts seeing "I set exempt, why are my conditions still enforced".

The page explained how the three bypass modes interact with condition
injection, which a reader does not need in order to configure Mergify. It
also got that explanation wrong: it claimed `exempt` makes Mergify skip
injection, which is no longer what the engine does.

Say what to configure instead: add Mergify as a bypass actor and set the mode
to `exempt`, everywhere the page used to recommend `always`. That also covers
GitHub-native stacked pull requests, which need `exempt` specifically, so one
recommendation now fits every case.

Rename the section to "Bypass Actors" now that it no longer covers injection,
and point it at the step-by-step section further down.

Part of MRGFY-8578

Change-Id: Iafcbdb198dc7d2d8a8f27ac0ff7f4b7867b405a7
@kozlek
kozlek force-pushed the devs/kozlek/thomasberdy/mrgfy-8578-document-merge-queue-support-for-github-native-stacked-pull/correct-what-ruleset-bypass-mode-changes--afcbdb19 branch from f0af7cd to fd6c677 Compare August 12, 2026 17:02
@mergify
mergify Bot deployed to Mergify Merge Protections August 12, 2026 17:03 Active
@mergify
mergify Bot requested a review from a team August 13, 2026 07:06
mergify Bot pushed a commit that referenced this pull request Aug 13, 2026
…12367)

The Ruleset Rule Compatibility table put "Used by Merge Protections" in the `required_deployments` behavior column, directly under two rows reading "Injected as conditions". Readers compare the rows and conclude Mergify turns the rule into a merge condition, i.e. that it holds a pull request until the required deployment succeeds. It does not. The confusion is not hypothetical: a HackerOne reporter built an authorization-bypass report on that reading.

`get_repository_rulesets_conditions()` branches on `required_status_checks` and `pull_request` only. There is no `required_deployments` branch, so the rule is never injected, for the merge action or the merge queue.

The table has nothing to say about a rule Mergify does not inject, so the row goes and `required_deployments` joins the Ignored Rule Types list, which already says what a reader needs: "Mergify will not enforce them", "ensure they are enforced by GitHub directly on your target branch".

The intro made the same blanket claim one level up ("injects them as conditions"), now "injects the supported ones".

One caveat for the reviewer: the Ignored Rule Types section opens with "not processed by Mergify". That is true of the injection pipeline, which is what this page covers, but Mergify does read the rule elsewhere, in the Merge Protections healthcheck for `reporting_method: deployments`. If you would rather that nuance were visible, it belongs on the Merge Protections page, not here.

Adjacent PR: #12362 rewrites the bypass-mode guidance on this same file. It does not touch the table or the ignored list, and the two merge cleanly.

Fixes MRGFY-8644
@mergify

mergify Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Queued — the merge queue status continues in this comment ↓.

@kozlek

kozlek commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

@Mergifyio queue

@mergify

mergify Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

queue

🛑 The pull request cannot be checked because of an incompatibility with branch protections

Details

Mergify's bypass mode is not Exempt on repository rulesets Allow only Mergify and eng-mgr to update default branch, Do copilot_code_review on pull request, Require pull request for default branch. A GitHub stack is merged through GitHub's asynchronous Merge API, which honors only the Exempt bypass mode: an actor bypassing at Always or Pull requests only is evaluated as if it had no bypass at all, even though that same actor merges an ordinary pull request under the very same ruleset without trouble.
The fix is to set Mergify's bypass mode to Exempt on Allow only Mergify and eng-mgr to update default branch, Do copilot_code_review on pull request, Require pull request for default branch.

@mergify

mergify Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 4 minutes 51 seconds in the queue, including 3 minutes 19 seconds running CI.

Required conditions to merge

@mergify mergify Bot added the queued label Aug 13, 2026
@mergify
mergify Bot merged commit cfee477 into main Aug 13, 2026
10 checks passed
@mergify
mergify Bot deleted the devs/kozlek/thomasberdy/mrgfy-8578-document-merge-queue-support-for-github-native-stacked-pull/correct-what-ruleset-bypass-mode-changes--afcbdb19 branch August 13, 2026 08:00
@mergify mergify Bot removed the queued label Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants