Add GitOps policy to auto-label backport candidates when CL-BuildPackaging is added#26881
Merged
daxian-dbw merged 2 commits intoFeb 23, 2026
Merged
Conversation
…label is added Co-authored-by: TravisEz13 <[email protected]>
Copilot
AI
changed the title
[WIP] Add GitOps PullRequestIssueManagement policy for labels
Add GitOps policy to auto-label backport candidates when CL-BuildPackaging is added
Feb 23, 2026
TravisEz13
approved these changes
Feb 23, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a new GitOps policy to automatically label open pull requests targeting master with backport consideration labels when the CL-BuildPackaging label is added. This automation helps ensure that build and packaging changes are properly tracked for potential backporting to active release branches (7.4.x, 7.5.x, and 7.6.x).
Changes:
- Adds a new
GitOps.PullRequestIssueManagementpolicy that triggers onCL-BuildPackaginglabel addition - Implements three separate event responder tasks (one per backport label) to apply
BackPort-*-Considerlabels - Includes duplicate prevention guards using
not: hasLabelconditions
daxian-dbw
approved these changes
Feb 23, 2026
JustinGrote
pushed a commit
to JustinGrote/PowerShell
that referenced
this pull request
Jun 2, 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.
Adds a new
GitOps.PullRequestIssueManagementpolicy that automatically appliesBackPort-7.4.x-Consider,BackPort-7.5.x-Consider, andBackPort-7.6.x-Considerlabels wheneverCL-BuildPackagingis added to an open PR targetingmaster.Changes
.github/policies/labelAdded.clBuildPackaging.addBackportConsider.yml— new policy file with:eventResponderTasks, one per backport labelnot: hasLabelto prevent duplicate label applicationpayloadType: Pull_Request+isOpen+labelAdded: CL-BuildPackaging+targetsBranch: masterThree separate tasks (rather than one task with three
addLabelactions) are required because the policy engine'sthenblocks don't support conditional logic — per-labelnot: hasLabelguards can only be expressed at the task level.Original prompt
This pull request was created from Copilot chat.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.