diff --git a/.github/policies/untriaged-label.yml b/.github/policies/untriaged-label.yml new file mode 100644 index 000000000..86a32ba43 --- /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