From 56f05fba46069f90402f2a739be85c02efbbcab0 Mon Sep 17 00:00:00 2001 From: Demitrius Nelon Date: Thu, 6 Aug 2026 15:00:06 -0700 Subject: [PATCH] Add In-PR label policy for issue tracking Adds .github/policies/labelManagement.issueUpdated.yml so issues referenced by pull requests automatically receive the In-PR label, matching the convention already in place across other microsoft/winget-* repos (e.g. winget-cli, winget-create, winget-dsc, winget-studio, winget-command-not-found, mxc). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../policies/labelManagement.issueUpdated.yml | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/policies/labelManagement.issueUpdated.yml diff --git a/.github/policies/labelManagement.issueUpdated.yml b/.github/policies/labelManagement.issueUpdated.yml new file mode 100644 index 00000000..1f6b19c2 --- /dev/null +++ b/.github/policies/labelManagement.issueUpdated.yml @@ -0,0 +1,49 @@ +id: labelManagement.issueUpdated +name: GitOps.PullRequestIssueManagement +description: >- + Handlers for when an issue is updated and not closed + This primarily includes handlers for comments, reviews, and re-runs +owner: +resource: repository +disabled: false +where: +configuration: + resourceManagementConfiguration: + eventResponderTasks: + - description: Clean email replies on every comment + if: + - or: + - payloadType: Issue_Comment + - payloadType: Pull_Request_Review_Comment + then: + - cleanEmailReply + - description: >- + If an author responds to an issue which needs author feedback + * Remove the Needs-Author-Feedback Label + if: + - or: + - payloadType: Pull_Request_Review + - payloadType: Pull_Request_Review_Comment + - payloadType: Issue_Comment + - isActivitySender: + issueAuthor: True + - hasLabel: + label: Needs-Author-Feedback + - not: + isAction: + action: Synchronize + then: + - removeLabel: + label: Needs-Author-Feedback + - description: Sync labels from issues on all pull request events + if: + - payloadType: Pull_Request + then: + - labelSync: + pattern: Issue- + - labelSync: + pattern: Area- + - inPrLabel: + label: In-PR +onFailure: +onSuccess: