From 886f7f4262c255a989c729ea8aaec3ffb8e35e3a Mon Sep 17 00:00:00 2001 From: Keith Mahoney Date: Fri, 10 Nov 2023 15:29:25 -0800 Subject: [PATCH 1/3] Update policy yml --- .github/policies/resourceManagement.yml | 117 ++++++++++++++++-------- 1 file changed, 80 insertions(+), 37 deletions(-) diff --git a/.github/policies/resourceManagement.yml b/.github/policies/resourceManagement.yml index a0678cae6a..25dfc15a14 100644 --- a/.github/policies/resourceManagement.yml +++ b/.github/policies/resourceManagement.yml @@ -8,7 +8,7 @@ where: configuration: resourceManagementConfiguration: scheduledSearches: - - description: + - description: Close needs-author-feedback issue with no-recent-activity after 7 days frequencies: - hourly: hour: 6 @@ -23,7 +23,8 @@ configuration: days: 7 actions: - closeIssue - - description: + + - description: Add no-recent-activity to issue with needs-author-feedback after 7 days frequencies: - hourly: hour: 6 @@ -41,38 +42,63 @@ configuration: label: no-recent-activity - addReply: reply: This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **7 days**. It will be closed if no further activity occurs **within 7 days of this comment**. + + eventResponderTasks: - - if: + + - description: Declined PR + if: - payloadType: Pull_Request - labelAdded: label: declined then: - addReply: - reply: We appreciate the feedback, however this doesn’t currently align to the project’s goals and roadmap and so will be automatically closed. Thank you for your contributions to WinUI! + reply: We appreciate the feedback, however this doesn't currently align to the project's goals and roadmap and so will be automatically closed. Thank you for your contributions to WinUI! - closeIssue - description: - - if: + + + - description: Enable auto merge + if: - payloadType: Pull_Request - hasLabel: label: auto merge then: - enableAutoMerge: mergeMethod: Squash - description: - - if: + + + - description: Disable auto merge + if: - payloadType: Pull_Request - labelRemoved: label: auto merge then: - disableAutoMerge - description: - - if: + + + - description: working on it + if: - payloadType: Pull_Request then: - inPrLabel: label: working on it - description: - - if: + + + - description: Add needs-triage to new or reopened Issue + if: + - payloadType: Issues + - or: + - isAction: + action: Opened + - isAction: + action: Reopened + then: + - addLabel: + label: needs-triage + + + - description: Add needs-triage to issues when team- label removed + if: - payloadType: Issues - or: - labelRemoved: @@ -92,30 +118,35 @@ configuration: then: - addLabel: label: needs-triage - description: - - if: + + + - description: Remove needs-triage from Closed items + if: - payloadType: Issues - isAction: action: Closed then: - removeLabel: label: needs-triage - description: - - if: + + + description: Add needs-triage to closed item if commented on by external user + - if: - payloadType: Issue_Comment - not: isOpen - - hasLabel: - label: needs-triage - - or: - - activitySenderHasPermission: - permission: Write - - activitySenderHasPermission: - permission: Admin + - not: + - or: + - activitySenderHasPermission: + permission: Write + - activitySenderHasPermission: + permission: Admin then: - - removeLabel: + - addLabel: label: needs-triage - description: - - if: + + + - description: Remove needs-author-feedback after comment from author and add needs-assignee-attention (if issue is assigned) + if: - payloadType: Issue_Comment - isAction: action: Created @@ -129,8 +160,10 @@ configuration: label: needs-assignee-attention - removeLabel: label: needs-author-feedback - description: - - if: + + + - description: Remove needs-author-feedback after comment from author and add needs-triage (if issue is unassigned) + if: - payloadType: Issue_Comment - isAction: action: Created @@ -144,8 +177,10 @@ configuration: label: needs-triage - removeLabel: label: needs-author-feedback - description: - - if: + + + - description: Add needs-triage to new PR + if: - payloadType: Pull_Request - or: - isAction: @@ -155,8 +190,10 @@ configuration: then: - addLabel: label: needs-triage - description: - - if: + + + - description: Remove needs-author-feedback after comment from author and add needs-triage + if: - payloadType: Issue_Comment - isAction: action: Created @@ -170,8 +207,10 @@ configuration: label: needs-triage - removeLabel: label: needs-author-feedback - description: - - if: + + + - description: Remove no-recent-activity from issue + if: - payloadType: Issues - not: isAction: @@ -181,14 +220,18 @@ configuration: then: - removeLabel: label: no-recent-activity - description: - - if: + + + - description: Remove no-recent-activity from issue after comment + if: - payloadType: Issue_Comment - hasLabel: label: no-recent-activity then: - removeLabel: label: no-recent-activity - description: + + + onFailure: onSuccess: From 25c9e5275d66c83262798cf28abc8aaadc6dc05f Mon Sep 17 00:00:00 2001 From: Keith Mahoney Date: Fri, 10 Nov 2023 15:34:13 -0800 Subject: [PATCH 2/3] fix condition --- .github/policies/resourceManagement.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/policies/resourceManagement.yml b/.github/policies/resourceManagement.yml index 25dfc15a14..80b913d74b 100644 --- a/.github/policies/resourceManagement.yml +++ b/.github/policies/resourceManagement.yml @@ -135,7 +135,7 @@ configuration: - payloadType: Issue_Comment - not: isOpen - not: - - or: + or: - activitySenderHasPermission: permission: Write - activitySenderHasPermission: From 3b6bcd29f64428366aa934f378d2b7729604e384 Mon Sep 17 00:00:00 2001 From: Keith Mahoney Date: Fri, 10 Nov 2023 15:36:15 -0800 Subject: [PATCH 3/3] remove needs-triage rule for changed team- label --- .github/policies/resourceManagement.yml | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/.github/policies/resourceManagement.yml b/.github/policies/resourceManagement.yml index 80b913d74b..56a77e942f 100644 --- a/.github/policies/resourceManagement.yml +++ b/.github/policies/resourceManagement.yml @@ -95,29 +95,6 @@ configuration: then: - addLabel: label: needs-triage - - - - description: Add needs-triage to issues when team- label removed - if: - - payloadType: Issues - - or: - - labelRemoved: - label: team-CompInput - - labelRemoved: - label: team-Controls - - labelRemoved: - label: team-Framework - - labelRemoved: - label: team-Ink - - labelRemoved: - label: team-Markup - - labelRemoved: - label: team-Reach - - labelRemoved: - label: team-Rendering - then: - - addLabel: - label: needs-triage - description: Remove needs-triage from Closed items