From 1d1919f75a2540a491db93152e44c6ad9322a2e9 Mon Sep 17 00:00:00 2001 From: Chet Husk Date: Tue, 16 Sep 2025 11:46:15 -0500 Subject: [PATCH] add the gitops automation for the untriaged label --- .github/policies/untriaged-label.yml | 38 ++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/policies/untriaged-label.yml diff --git a/.github/policies/untriaged-label.yml b/.github/policies/untriaged-label.yml new file mode 100644 index 0000000000..86a32ba437 --- /dev/null +++ b/.github/policies/untriaged-label.yml @@ -0,0 +1,38 @@ +id: untriaged +name: GitOps.PullRequestIssueManagement +description: Manage the 'untriaged' label on issues +resource: repository + +configuration: + resourceManagementConfiguration: + eventResponderTasks: + - description: Add untriaged label to new/reopened issues without a milestone + if: + - payloadType: Issues + - isOpen + - not: + isPartOfAnyMilestone + - or: + - isAction: + action: Opened + - isAction: + action: Reopened + - not: + hasLabel: + label: untriaged + then: + - addLabel: + label: untriaged + + - description: Remove untriaged label from issues when closed or added to a milestone + if: + - payloadType: Issues + - or: + - isAction: + action: Closed + - isPartOfAnyMilestone + - hasLabel: + label: untriaged + then: + - removeLabel: + label: untriaged