From b4b312daff8f3584232369148f09401b3eafcd58 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Wed, 17 Jul 2024 12:54:20 -0400 Subject: [PATCH] ci: adds policies bot configuration --- .github/policies/resourceManagement.yml | 104 ++++++++---------------- 1 file changed, 34 insertions(+), 70 deletions(-) diff --git a/.github/policies/resourceManagement.yml b/.github/policies/resourceManagement.yml index f88993e7ae..9a2d4e7257 100644 --- a/.github/policies/resourceManagement.yml +++ b/.github/policies/resourceManagement.yml @@ -1,14 +1,14 @@ -id: +id: name: GitOps.PullRequestIssueManagement description: GitOps.PullRequestIssueManagement primitive -owner: +owner: resource: repository disabled: false -where: +where: configuration: resourceManagementConfiguration: scheduledSearches: - - description: + - description: frequencies: - hourly: hour: 1 @@ -18,14 +18,14 @@ configuration: - hasLabel: label: 'status:waiting-for-author-feedback' - hasLabel: - label: 'Status: No Recent Activity' + label: no-recent-activity - noActivitySince: days: 3 - isNotLabeledWith: - label: Service Bug + label: service issue actions: - closeIssue - - description: + - description: frequencies: - hourly: hour: 1 @@ -37,15 +37,13 @@ configuration: - noActivitySince: days: 4 - isNotLabeledWith: - label: 'Status: No Recent Activity' - - isNotLabeledWith: - label: Service Bug + label: no-recent-activity actions: - addLabel: - label: 'Status: No Recent Activity' + 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 **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**. - - description: + - description: frequencies: - hourly: hour: 1 @@ -60,28 +58,6 @@ configuration: - addReply: reply: This issue has been marked as duplicate and has not had any activity for **1 day**. It will be closed for housekeeping purposes. - closeIssue - - description: - frequencies: - - hourly: - hour: 1 - filters: - - isOpen - - hasLabel: - label: 'API: Graph' - - noActivitySince: - days: 14 - actions: - - addLabel: - label: Service issue - - addReply: - reply: >- - Hello @${issueAuthor} - - - Thank you for reporting your concern. If you report this issue in the Microsoft Q&A forum, it will get routed to the appropriate team for them to triage. - - - https://aka.ms/askgraph eventResponderTasks: - if: - payloadType: Issues @@ -93,17 +69,6 @@ configuration: - removeLabel: label: 'status:waiting-for-author-feedback' description: - - if: - - payloadType: Issues - - and: - - isOpen - - not: - and: - - isAssignedToSomeone - - isLabeled - then: - - addLabel: - label: 'ToTriage' - if: - payloadType: Issue_Comment - isAction: @@ -114,21 +79,29 @@ configuration: label: 'status:waiting-for-author-feedback' then: - addLabel: - label: "Needs: Attention \U0001F44B" + label: 'Needs: Attention :wave:' - removeLabel: label: 'status:waiting-for-author-feedback' - description: + description: - if: - payloadType: Issues - not: isAction: action: Closed - hasLabel: - label: 'Status: No Recent Activity' + label: no-recent-activity then: - removeLabel: - label: 'Status: No Recent Activity' - description: + label: no-recent-activity + description: + - if: + - payloadType: Issue_Comment + - hasLabel: + label: no-recent-activity + then: + - removeLabel: + label: no-recent-activity + description: - if: - payloadType: Issue_Comment - activitySenderHasAssociation: @@ -142,25 +115,16 @@ configuration: then: - addLabel: label: 'status:waiting-for-author-feedback' - description: + description: - if: - - payloadType: Issue_Comment - - hasLabel: - label: 'API: Graph' + - payloadType: Issues + - or: + - isAssignedToSomeone + - isAction: + action: Closed then: - - addReply: - reply: >- - Hello @${issueAuthor} - - - Thank you for reporting your concern. If you report this issue in the Microsoft Q&A forum, it will get routed to the appropriate team for them to triage. - - https://aka.ms/askgraph - - This issue will now be closed. If you encounter any issues in the future, please feel free to open an issue. - - addLabel: - label: Service issue - - closeIssue - description: -onFailure: -onSuccess: + - removeLabel: + label: ToTriage + description: +onFailure: +onSuccess: