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: