From 046cf3cf118bfbc7fd867a44d8e07db75f486142 Mon Sep 17 00:00:00 2001 From: Demitrius Nelon Date: Thu, 6 Aug 2026 13:38:42 -0700 Subject: [PATCH] Add Copilot-Instructions label policy rule Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../policies/labelManagement.issueOpened.yml | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/policies/labelManagement.issueOpened.yml diff --git a/.github/policies/labelManagement.issueOpened.yml b/.github/policies/labelManagement.issueOpened.yml new file mode 100644 index 00000000..860a6702 --- /dev/null +++ b/.github/policies/labelManagement.issueOpened.yml @@ -0,0 +1,29 @@ +id: labelManagement.issueOpened +name: GitOps.PullRequestIssueManagement +description: Handlers for when an issue is first opened +owner: +resource: repository +disabled: false +where: +configuration: + resourceManagementConfiguration: + eventResponderTasks: + - description: Add Copilot-Instructions label to PRs modifying Copilot instruction files + if: + - payloadType: Pull_Request + - or: + - isAction: + action: Opened + - isAction: + action: Synchronize + - filesMatchPattern: + pattern: ^\.github/(copilot-instructions\.md|instructions/.+\.instructions\.md)$ + matchAny: true + - not: + hasLabel: + label: Copilot-Instructions + then: + - addLabel: + label: Copilot-Instructions +onFailure: +onSuccess: