Flatten inter-branch merge Policy Service rules - #37068
Merged
Merged
Conversation
Avoid the unique nested or-of-and matcher shape while preserving the exact bot, Opened event, target branch, title, and merge-method requirements for every allowed flow. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1b2b2dd6-bf5f-4179-8a8f-c4c85b9bce26
PureWeen
temporarily deployed
to
copilot-pat-pool
August 3, 2026 23:27 — with
GitHub Actions
Inactive
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 37068Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 37068" |
|
Azure Pipelines: 1 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
PureWeen
temporarily deployed
to
copilot-pat-pool
August 3, 2026 23:28 — with
GitHub Actions
Inactive
PureWeen
temporarily deployed
to
copilot-pat-pool
August 3, 2026 23:29 — with
GitHub Actions
Inactive
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the repo’s Policy Service configuration for automated inter-branch merge PRs by replacing a single nested or-of-and matcher with four separate, flat rules—one per allowed title/target-branch pair—while preserving the same sender/action/branch/title restrictions.
Changes:
- Split the prior nested inter-branch merge matcher into four explicit rules (main→net11.0, net11.0→preview7, net11.0→rc1, net11.0→rc2).
- Kept the security gates intact (exact bot sender,
Openedonly, anchored title regex, allow-listed target branches, merge-commit auto-merge,triggerOnOwnActions: false).
Show a summary per file
| File | Description |
|---|---|
| .github/policies/resourceManagement.yml | Replaces the nested inter-branch merge matcher with four flat, explicit Policy Service rules for the allowed forward-merge flows. |
Copilot's findings
Suppressed comments (3)
.github/policies/resourceManagement.yml:743
- For consistency with the rest of this file, consider moving this task's
description:to the end (afterthen:). Right now the inter-branch tasks are the only ones that start withdescription:, which is easy to miss when scanning conditions and actions.
- description: '[Inter-branch merge] Auto-approve net11.0 to preview7'
triggerOnOwnActions: false
if:
.github/policies/resourceManagement.yml:783
- Same formatting consistency issue as the other new inter-branch tasks:
description:appears at the top instead of at the end of the task like the rest of the file. Aligning with the file's pattern makes these rules easier to maintain.
- description: '[Inter-branch merge] Auto-approve net11.0 to rc2'
triggerOnOwnActions: false
if:
.github/policies/resourceManagement.yml:763
- This inter-branch task's top-level key order differs from the established pattern in this file (
if→then→description). Keeping the same layout across tasks improves readability and reduces the chance of missing conditions/actions during edits.
- description: '[Inter-branch merge] Auto-approve net11.0 to rc1'
triggerOnOwnActions: false
if:
- Files reviewed: 1/1 changed files
- Comments generated: 1
PureWeen
temporarily deployed
to
copilot-pat-pool
August 3, 2026 23:32 — with
GitHub Actions
Inactive
PureWeen
temporarily deployed
to
copilot-pat-pool
August 3, 2026 23:33 — with
GitHub Actions
Inactive
PureWeen
temporarily deployed
to
copilot-pat-pool
August 3, 2026 23:33 — with
GitHub Actions
Inactive
kubaflo
approved these changes
Aug 4, 2026
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.
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Replaces #37050 with a clean, one-commit branch from current
main.Motivation
Live generated inter-branch PRs #37007 and #37042 matched the configured bot sender,
Openedevent, exact title, and exact target branch, but hosted Policy Service supplied neither an approval nor an auto-merge request. Local evaluation with the production package successfully deserializes and matches the current nested rule, while Policy Service remains active for other MAUI rules.The nested
or-of-andstructure is therefore the remaining evidence-backed hosted-runtime compatibility hypothesis. This is not a service-log-confirmed root cause: hosted evaluation catches task exceptions internally, so predicate-level diagnostics are unavailable from GitHub.Change
Replace the single nested matcher with four flat rules, one for each allowed title/target pair. Every rule preserves the existing security restrictions:
github-actions[bot]OpenedNo
Synchronizebehavior or broader matching is added.Validation
GitOps.PullRequestIssueManagement0.1.182deserialization: 24 tasks, 4 flat inter-branch taskstriggerOnOwnActionsassertions for all four rulesgit diff --checkThis change is an experiment to remove the remaining unique matcher shape. Definitive validation requires merging it and observing a fresh generated inter-branch PR receive the Policy Service approval and auto-merge request.