winget-cli

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 03aae50e2667c68c99e782f8e39a4a2bc81d8404
parent 80e7c79ae886736b7d51abc1f3489221f05c27b9
Author: Kaleb Luedtke <trenlymc@gmail.com>
Date:   Thu, 15 Jun 2023 13:58:04 -0500

Move GitOps rules to their own files (#3352)

* Update scheduled searches

* Update rules for when issues are opened and closed

* Update rules for when issues are updated

* Add moderator triggers

* Separate out AutoMerge triggers
* Remove unused rules

* Separate out Feedback Hub triggers

* Update InPR label trigger

* Cleanup comments

* Update .github/policies/automergeTriggers.yml

Co-authored-by: Muhammad Danish <mdanishkhdev@gmail.com>

---------

Co-authored-by: Muhammad Danish <mdanishkhdev@gmail.com>
Diffstat:
A.github/policies/automergeTriggers.yml | 31+++++++++++++++++++++++++++++++
A.github/policies/labelAdded.noRecentActivity.yml | 50++++++++++++++++++++++++++++++++++++++++++++++++++
A.github/policies/labelManagement.issueClosed.yml | 38++++++++++++++++++++++++++++++++++++++
A.github/policies/labelManagement.issueOpened.yml | 27+++++++++++++++++++++++++++
A.github/policies/labelManagement.issueUpdated.yml | 103+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
A.github/policies/labelManagement.needsFeedbackHub.yml | 57+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
A.github/policies/moderatorTriggers.yml | 316+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
D.github/policies/resourceManagement.yml | 398-------------------------------------------------------------------------------
A.github/policies/scheduledSearch.closeNoRecentActivity.yml | 67+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
A.github/policies/scheduledSearch.markNoRecentActivity.yml | 69+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
10 files changed, 758 insertions(+), 398 deletions(-)

diff --git a/.github/policies/automergeTriggers.yml b/.github/policies/automergeTriggers.yml @@ -0,0 +1,31 @@ +id: automergeTriggers +name: GitOps.PullRequestIssueManagement +description: Handles enabling / disabling automerge +owner: +resource: repository +disabled: false +where: +configuration: + resourceManagementConfiguration: + eventResponderTasks: + - description: Enable Auto Merge when the "AutoMerge" label is present + if: + - payloadType: Pull_Request + - hasLabel: + label: AutoMerge + then: + - enableAutoMerge: + mergeMethod: Squash + - description: Disable Auto Merge when the "AutoMerge" label is not present + if: + - payloadType: Pull_Request + - or: + - labelRemoved: + label: AutoMerge + - not: + hasLabel: + label: AutoMerge + then: + - disableAutoMerge +onFailure: +onSuccess: diff --git a/.github/policies/labelAdded.noRecentActivity.yml b/.github/policies/labelAdded.noRecentActivity.yml @@ -0,0 +1,50 @@ +id: labelAdded.noRecentActivity +name: GitOps.PullRequestIssueManagement +description: Handlers when "No-Recent-Activity" label is added +owner: +resource: repository +disabled: false +where: +configuration: + resourceManagementConfiguration: + eventResponderTasks: + - description: >- + When the label "No-Recent-Activity" is added to a pull request + * Add the PR specific reply notifying the issue author of pending closure + if: + - payloadType: Pull_Request + - labelAdded: + label: No-Recent-Activity + then: + - addReply: + reply: >- + Hello @${issueAuthor}, + + + This pull request 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**. + + + Template: msftbot/noRecentActivity + # The policy service should trigger even when the label was added by the policy service + triggerOnOwnActions: true + - description: >- + When the label "No-Recent-Activity" is added to an issue + * Add the issue specific reply notifying the issue author of pending closure + if: + - payloadType: Issues + - labelAdded: + label: No-Recent-Activity + then: + - addReply: + reply: >- + Hello @${issueAuthor}, + + + 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**. + + + Template: msftbot/noRecentActivity + # The policy service should trigger even when the label was added by the policy service + triggerOnOwnActions: true +onFailure: +onSuccess: diff --git a/.github/policies/labelManagement.issueClosed.yml b/.github/policies/labelManagement.issueClosed.yml @@ -0,0 +1,38 @@ +id: labelManagement.issueClosed +name: GitOps.PullRequestIssueManagement +description: Handlers when an issue gets closed +owner: +resource: repository +disabled: false +where: +configuration: + resourceManagementConfiguration: + eventResponderTasks: + - description: Remove labels when an issue is closed + if: + - payloadType: Issues + - isAction: + action: Closed + then: + - removeLabel: + label: Needs-Triage + - removeLabel: + label: Needs-Attention + - removeLabel: + label: Needs-Author-Feedback + - removeLabel: + label: Help-Wanted + ## TODO: Unassign author + - description: Remove labels when a pull request is closed + if: + - payloadType: Pull_Request + - isAction: + action: Closed + then: + - removeLabel: + label: Needs-Attention + - removeLabel: + label: Needs-Author-Feedback + ## TODO: Unassign Users +onFailure: +onSuccess: diff --git a/.github/policies/labelManagement.issueOpened.yml b/.github/policies/labelManagement.issueOpened.yml @@ -0,0 +1,27 @@ +id: labelManagement.issueOpened +name: GitOps.PullRequestIssueManagement +description: Handlers for when an issue is first opened +owner: +resource: repository +disabled: false +where: +configuration: + resourceManagementConfiguration: + eventResponderTasks: + - description: Add CodeFlow link to new PRs + if: + - payloadType: Pull_Request + - isAction: + action: Opened + then: + - addCodeFlowLink + - description: Add Needs-Triage to new issues + if: + - payloadType: Issues + - isAction: + action: Opened + then: + - addLabel: + label: Needs-Triage +onFailure: +onSuccess: diff --git a/.github/policies/labelManagement.issueUpdated.yml b/.github/policies/labelManagement.issueUpdated.yml @@ -0,0 +1,103 @@ +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: Remove "No-Recent-Activity" when a pull request or issue is updated + if: + - or: + - payloadType: Pull_Request + - payloadType: Pull_Request_Review + - payloadType: Pull_Request_Review_Comment + - payloadType: Issue_Comment + - payloadType: Issues + - not: + isAction: + action: Closed + - hasLabel: + label: No-Recent-Activity + then: + - removeLabel: + label: No-Recent-Activity + # The policy service should not trigger itself here, or else the label would be removed immediately after being added + triggerOnOwnActions: False + - description: Clean email replies on every comment + if: + - payloadType: Issue_Comment + then: + - cleanEmailReply + - description: Remove "Help-Wanted" label when an issue goes into PR + if: + - payloadType: Issues + - labelAdded: + label: In-PR + - hasLabel: + label: Help-Wanted + then: + - removeLabel: + label: Help-Wanted + - description: >- + If an author responds to an issue which needs author feedback + * Remove the Needs-Author-Feedback Label + * Add the Needs-Attention 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 + - addLabel: + label: Needs-Attention + - description: >- + When changes are requested on a pull request + * Disable automerge + * Assign to the author + * Label with Needs-Author-Feedback + if: + - payloadType: Pull_Request_Review + - isAction: + action: Submitted + - isReviewState: + reviewState: Changes_requested + then: + - disableAutoMerge + - assignTo: + author: True + - addLabel: + 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- + - labelSync: + pattern: Priority- + - labelSync: + pattern: Product- + - labelSync: + pattern: Severity- + - labelSync: + pattern: Impact- + - inPrLabel: + label: In-PR +onFailure: +onSuccess: diff --git a/.github/policies/labelManagement.needsFeedbackHub.yml b/.github/policies/labelManagement.needsFeedbackHub.yml @@ -0,0 +1,57 @@ +id: labelManagement.needsFeedbackHub +name: GitOps.PullRequestIssueManagement +description: Handlers when feedback hub is needed +owner: +resource: repository +disabled: false +where: +configuration: + resourceManagementConfiguration: + eventResponderTasks: + - description: >- + When the label "Needs-Feedback-Hub" is added to an issue or a repo admin comments /feedback + * Add a reply notifying the issue author + * Assign to the author + * Label with Needs-Author-Feedback + * Remove Needs-Feedback-Hub label + if: + - or: + # Trigger by label add + - and: + - payloadType: Issues + - labelAdded: + label: Needs-Feedback-Hub + # Trigger by comment + - and: + - payloadType: Issue_Comment + - commentContains: + pattern: '\/feedback' + isRegex: True + - or: + - activitySenderHasPermission: + permission: Admin + - activitySenderHasPermission: + permission: Write + then: + - addReply: + reply: >- + Hello @${issueAuthor}, + + + Please send us feedback with the Feedback Hub [Windows]+[f] with this issue and paste the link here so we can more easily find your crash information on the back end. + + Please use "Apps" and "Windows Package Manager" for the Category. + + + The link on the bottom of the feedback report will provide the URL to paste in this Issue to share with us. + + + Template: msftbot/feedbackHub + - assignTo: + author: True + - addLabel: + label: Needs-Author-Feedback + - removeLabel: + label: Needs-Feedback-Hub +onFailure: +onSuccess: diff --git a/.github/policies/moderatorTriggers.yml b/.github/policies/moderatorTriggers.yml @@ -0,0 +1,316 @@ +id: moderatorTriggers +name: GitOps.PullRequestIssueManagement +description: Defines the users and permissions for the moderators +owner: +resource: repository +disabled: false +where: +configuration: + resourceManagementConfiguration: + eventResponderTasks: + - if: + # If the activity sender is any one of the moderators, has Admin permission on the repo, or has Write permissions on the repo. . . + - or: + - activitySenderHasPermission: + permission: Admin + - activitySenderHasPermission: + permission: Write + - isActivitySender: + user: ImJoakim + issueAuthor: False + - isActivitySender: + user: ItzLevvie + issueAuthor: False + - isActivitySender: + user: jedieaston + issueAuthor: False + - isActivitySender: + user: KaranKad + issueAuthor: False + - isActivitySender: + user: OfficialEsco + issueAuthor: False + - isActivitySender: + user: quhxl + issueAuthor: False + - isActivitySender: + user: Trenly + issueAuthor: False + - isActivitySender: + user: mdanish-kh + issueAuthor: False + - isActivitySender: + user: russellbanks + issueAuthor: False + then: + # If the payload is an issue_Comment or a Pull_Request_Review_Comment + - if: + - or: + - payloadType: Issue_Comment + - payloadType: Pull_Request_Review_Comment + # Take different actions based on the comment pattern + then: + # Blocking-Issue + - if: + - commentContains: + pattern: '\[[Pp]olicy\]\s+[bB]locking[\s-][iI]ssue' + isRegex: True + then: + - removeLabel: + label: Needs-Author-Feedback + - removeLabel: + label: Needs-Attention + - addLabel: + label: Blocking-Issue + # Dependencies + - if: + - commentContains: + pattern: '\[[Pp]olicy\]\s+[dD]ependencies' + isRegex: True + then: + - addLabel: + label: Dependencies + # Area-External + - if: + - commentContains: + pattern: '\[[Pp]olicy\]\s+[aA]rea[\s-][eE]xternal' + isRegex: True + then: + - addLabel: + label: Area-External + # Zipped-Binary + - if: + - commentContains: + pattern: '\[[Pp]olicy\]\s+[zZ]ip(ped)?[\s-][bB]inary' + isRegex: True + then: + - addLabel: + label: Zipped-Binary + # Area-Output + - if: + - commentContains: + pattern: '\[[Pp]olicy\]\s+[aA]rea[\s-][oO]utput' + isRegex: True + then: + - addLabel: + label: Area-Output + # Area-Settings + - if: + - commentContains: + pattern: '\[[Pp]olicy\]\s+[aA]rea[\s-][sS]ettings' + isRegex: True + then: + - addLabel: + label: Area-Settings + # Area-Localization + - if: + - commentContains: + pattern: '\[[Pp]olicy\]\s+[aA]rea[\s-][lL]ocalization' + isRegex: True + then: + - addLabel: + label: Area-Localization + # Area-Accessibility + - if: + - commentContains: + pattern: '\[[Pp]olicy\]\s+[aA]rea[\s-][aA]ccessibility' + isRegex: True + then: + - addLabel: + label: Area-Accessibility + # Area-Manifest + - if: + - commentContains: + pattern: '\[[Pp]olicy\]\s+[aA]rea[\s-][mM]anifest' + isRegex: True + then: + - addLabel: + label: Area-Manifest + # Area-GPO + - if: + - commentContains: + pattern: '\[[Pp]olicy\]\s+[aA]rea[\s-][gG][pP][oO]]' + isRegex: True + then: + - addLabel: + label: Area-GPO + # Area-Path + - if: + - commentContains: + pattern: '\[[Pp]olicy\]\s+[aA]rea[\s-][pP]ath' + isRegex: True + then: + - addLabel: + label: Area-Path + # Area-Matching + - if: + - commentContains: + pattern: '\[[Pp]olicy\]\s+[aA]rea[\s-][mM]atching' + isRegex: True + then: + - addLabel: + label: Area-Matching + # Command-Export + - if: + - commentContains: + pattern: '\[[Pp]olicy\]\s+[cC]ommand[\s-][eE]xport' + isRegex: True + then: + - addLabel: + label: Command-Export + # Command-Search + - if: + - commentContains: + pattern: '\[[Pp]olicy\]\s+[cC]ommand[\s-][sS]earch' + isRegex: True + then: + - addLabel: + label: Command-Search + # Command-List + - if: + - commentContains: + pattern: '\[[Pp]olicy\]\s+[cC]ommand[\s-][lL]ist' + isRegex: True + then: + - addLabel: + label: Command-List + # Command-Install + - if: + - commentContains: + pattern: '\[[Pp]olicy\]\s+[cC]ommand[\s-][iI]nstall' + isRegex: True + then: + - addLabel: + label: Command-Install + # Command-Import + - if: + - commentContains: + pattern: '\[[Pp]olicy\]\s+[cC]ommand[\s-][iI]mport' + isRegex: True + then: + - addLabel: + label: Command-Import + # Command-Uninstall + - if: + - commentContains: + pattern: '\[[Pp]olicy\]\s+[cC]ommand[\s-][uU]ninstall' + isRegex: True + then: + - addLabel: + label: Command-Uninstall + # Command-Source + - if: + - commentContains: + pattern: '\[[Pp]olicy\]\s+[cC]ommand[\s-][sS]ource' + isRegex: True + then: + - addLabel: + label: Command-Source + # Command-Pin + - if: + - commentContains: + pattern: '\[[Pp]olicy\]\s+[cC]ommand[\s-][pP]in' + isRegex: True + then: + - addLabel: + label: Command-Pin + # Command-Configure + - if: + - commentContains: + pattern: '\[[Pp]olicy\]\s+[cC]ommand[\s-][cC]onfigure' + isRegex: True + then: + - addLabel: + label: Command-Configure + # Command-Upgrade + - if: + - commentContains: + pattern: '\[[Pp]olicy\]\s+[cC]ommand[\s-][uU]pgrade' + isRegex: True + then: + - addLabel: + label: Command-Upgrade + # Command-Show + - if: + - commentContains: + pattern: '\[[Pp]olicy\]\s+[cC]ommand[\s-][sS]how' + isRegex: True + then: + - addLabel: + label: Command-Show + # Needs-Author-Feedback + - if: + - commentContains: + pattern: '\[[Pp]olicy\]\s+[Nn]eeds[\s-][Aa]uthor[\s-][fF]eedback' + isRegex: True + then: + - addLabel: + label: Needs-Author-Feedback + # Needs-Attention + - if: + - commentContains: + pattern: '\[[Pp]olicy\]\s+[Nn]eeds[\s-][Aa]ttention' + isRegex: True + then: + - addLabel: + label: Needs-Attention + # Experimental + - if: + - commentContains: + pattern: '\[[Pp]olicy\]\s+[eE]xperimental' + isRegex: True + then: + - addLabel: + label: Experimental + # Portable + - if: + - commentContains: + pattern: '\[[Pp]olicy\]\s+[pP]ortable' + isRegex: True + then: + - addLabel: + label: Portable + # PowerShell + - if: + - commentContains: + pattern: '\[[Pp]olicy\]\s+[pP]ower[sS]hell' + isRegex: True + then: + - addLabel: + label: PowerShell + # Side-By-Side + - if: + - commentContains: + pattern: '\[[Pp]olicy\]\s+[sS]ide[\s-][bB]y[\s-][sS]ide' + isRegex: True + then: + - addLabel: + label: Side-By-Side + # Duplicate of # + - if: + - commentContains: + pattern: Duplicate\s+of\s+\#?\s*\d+ + isRegex: True + then: + - addReply: + reply: >- + Hello @${issueAuthor}, + + + We've identified this as a duplicate of another issue or PR that already exists. This specific instance is being closed in favor of the linked issue. Please add your 👍 to the other issue to raise its priority. Thanks for your contribution! + + + Template: msftbot/duplicate/closed + - closeIssue + - removeLabel: + label: Needs-Triage + - removeLabel: + label: Needs-Attention + - removeLabel: + label: Needs-Feedback-Hub + - removeLabel: + label: Needs-Author-Feedback + - addLabel: + label: Resolution-Duplicate +onFailure: +onSuccess: diff --git a/.github/policies/resourceManagement.yml b/.github/policies/resourceManagement.yml @@ -1,398 +0,0 @@ -id: -name: GitOps.PullRequestIssueManagement -description: GitOps.PullRequestIssueManagement primitive -owner: -resource: repository -disabled: false -where: -configuration: - resourceManagementConfiguration: - scheduledSearches: - - description: - frequencies: - - hourly: - hour: 3 - filters: - - isIssue - - isOpen - - hasLabel: - label: Needs-Author-Feedback - - hasLabel: - label: No-Recent-Activity - - noActivitySince: - days: 7 - - isNotLabeledWith: - label: Issue-Feature - - hasLabel: - label: Blocking-Issue - actions: - - closeIssue - - description: - frequencies: - - hourly: - hour: 3 - filters: - - isIssue - - isOpen - - hasLabel: - label: Needs-Author-Feedback - - noActivitySince: - days: 7 - - isNotLabeledWith: - label: No-Recent-Activity - actions: - - addLabel: - label: No-Recent-Activity - - addReply: - reply: '@${issueAuthor} 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**.' - - description: - frequencies: - - hourly: - hour: 3 - filters: - - isIssue - - isOpen - - hasLabel: - label: Resolution-Duplicate - - noActivitySince: - days: 1 - actions: - - addReply: - reply: '@${issueAuthor} 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: 3 - filters: - - isPullRequest - - isOpen - - hasLabel: - label: Needs-Author-Feedback - - hasLabel: - label: No-Recent-Activity - - noActivitySince: - days: 7 - actions: - - closeIssue - - description: - frequencies: - - hourly: - hour: 3 - filters: - - isPullRequest - - isOpen - - hasLabel: - label: Needs-Author-Feedback - - noActivitySince: - days: 7 - - isNotLabeledWith: - label: No-Recent-Activity - actions: - - addLabel: - label: No-Recent-Activity - - addReply: - reply: '@${issueAuthor} this pull request 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: - - payloadType: Issues - - or: - - and: - - isAction: - action: Opened - then: - - addLabel: - label: Needs-Triage - description: - - if: - - payloadType: Issue_Comment - - isAction: - action: Created - - isActivitySender: - issueAuthor: True - - hasLabel: - label: Needs-Author-Feedback - then: - - addLabel: - label: Needs-Attention - - removeLabel: - label: Needs-Author-Feedback - - removeLabel: - label: No-Recent-Activity - description: - - if: - - payloadType: Issues - - not: - isAction: - action: Closed - - hasLabel: - label: No-Recent-Activity - then: - - removeLabel: - label: No-Recent-Activity - description: - - if: - - payloadType: Issue_Comment - - hasLabel: - label: No-Recent-Activity - then: - - removeLabel: - label: No-Recent-Activity - description: - - if: - - payloadType: Pull_Request - - isAction: - action: Opened - then: - - addCodeFlowLink - description: - - if: - - payloadType: Pull_Request_Review - - isAction: - action: Submitted - - isReviewState: - reviewState: Changes_requested - then: - - addLabel: - label: Needs-Author-Feedback - description: - - if: - - payloadType: Pull_Request - - isActivitySender: - issueAuthor: True - - not: - isAction: - action: Closed - - hasLabel: - label: Needs-Author-Feedback - then: - - removeLabel: - label: Needs-Author-Feedback - description: - - if: - - payloadType: Issue_Comment - - isActivitySender: - issueAuthor: True - - hasLabel: - label: Needs-Author-Feedback - then: - - removeLabel: - label: Needs-Author-Feedback - description: - - if: - - payloadType: Pull_Request_Review - - isActivitySender: - issueAuthor: True - - hasLabel: - label: Needs-Author-Feedback - then: - - removeLabel: - label: Needs-Author-Feedback - description: - - if: - - payloadType: Pull_Request - - not: - isAction: - action: Closed - - hasLabel: - label: No-Recent-Activity - then: - - removeLabel: - label: No-Recent-Activity - description: - - if: - - payloadType: Issue_Comment - - hasLabel: - label: No-Recent-Activity - then: - - removeLabel: - label: No-Recent-Activity - description: - - if: - - payloadType: Pull_Request_Review - - hasLabel: - label: No-Recent-Activity - then: - - removeLabel: - label: No-Recent-Activity - description: - - if: - - payloadType: Pull_Request - - hasLabel: - label: AutoMerge - then: - - enableAutoMerge: - mergeMethod: Squash - description: - - if: - - payloadType: Pull_Request - - labelRemoved: - label: AutoMerge - then: - - disableAutoMerge - description: - - if: - - payloadType: Pull_Request - then: - - inPrLabel: - label: In-PR - description: - - if: - - payloadType: Issues - - or: - - titleContains: - pattern: ^\s*Bug Report \(IF I DO NOT CHANGE THIS THE ISSUE WILL BE AUTO-CLOSED\)\s*$ - isRegex: True - - titleContains: - pattern: ^\s*Bug Report\s*$ - isRegex: True - - or: - - isAction: - action: Opened - - isAction: - action: Reopened - - not: - activitySenderHasPermission: - permission: Write - - not: - activitySenderHasPermission: - permission: Admin - then: - - closeIssue - - addLabel: - label: Needs-Author-Feedback - - addReply: - reply: "@${issueAuthor} thanks for attempting to open an issue. Unfortunately, your title wasn't changed from the original template which makes it very hard for us to track and triage. You are welcome to fix up the title and try again with a new issue." - description: - - if: - - payloadType: Issues - - or: - - isAction: - action: Opened - - isAction: - action: Reopened - - or: - - not: - bodyContains: - pattern: .+ - isRegex: True - then: - - closeIssue - - addLabel: - label: Needs-Author-Feedback - - addReply: - reply: "@${issueAuthor} thanks for attempting to open an issue. Unfortunately, you didn't write anything in the body which makes it impossible to understand your concern. You are welcome to fix up the issue and try again by opening another issue with the body filled out. " - description: - - if: - - payloadType: Issues - - hasLabel: - label: In-PR - - hasLabel: - label: Help Wanted - - isLabeled - then: - - removeLabel: - label: Help Wanted - description: - - if: - - payloadType: Issue_Comment - - commentContains: - pattern: Duplicate\s+of\s+\#?\s*\d+ - isRegex: True - - or: - - activitySenderHasPermission: - permission: Admin - - activitySenderHasPermission: - permission: Write - - isActivitySender: - user: ImJoakim - issueAuthor: False - - isActivitySender: - user: ItzLevvie - issueAuthor: False - - isActivitySender: - user: jedieaston - issueAuthor: False - - isActivitySender: - user: KaranKad - issueAuthor: False - - isActivitySender: - user: OfficialEsco - issueAuthor: False - - isActivitySender: - user: Trenly - issueAuthor: False - - isActivitySender: - user: quhxl - issueAuthor: False - then: - - addReply: - reply: "@${issueAuthor} we've identified this Issue as a duplicate of another one that already exists. This specific instance is being closed in favor of tracking the concern over on the referenced Issue. Thanks for your report! Be sure to add your \U0001F44D to the other issue to help raise the priority." - - closeIssue - - removeLabel: - label: Needs-Triage - - addLabel: - label: Resolution-Duplicate - - removeLabel: - label: Needs-Attention - - removeLabel: - label: Needs-Author-Feedback - - removeLabel: - label: Needs-Feedback-Hub - - removeLabel: - label: Needs-Repro - description: - - if: - - payloadType: Issue_Comment - - commentContains: - pattern: '\/feedback' - isRegex: True - - or: - - activitySenderHasPermission: - permission: Admin - - activitySenderHasPermission: - permission: Write - then: - - addReply: - reply: >- - @${issueAuthor},<br /><br /> - - Please send us feedback with the Feedback Hub [Windows]+[f] with this issue and paste the link here so we can more easily find your crash information on the back end?<br /><br /> - - Please use "Apps" and "Windows Package Manager" for the Category. <br /><br /> - - The link on the bottom of the feedback report will provide the URL to paste in this Issue to share with us. - - addLabel: - label: Needs-Author-Feedback - description: - - if: - - payloadType: Issue_Comment - then: - - cleanEmailReply - description: - - if: - - payloadType: Pull_Request - then: - - labelSync: - pattern: Issue- - - labelSync: - pattern: Area- - - labelSync: - pattern: Priority- - - labelSync: - pattern: Product- - - labelSync: - pattern: Severity- - - labelSync: - pattern: Impact- - description: - - if: - - payloadType: Issues - - isAction: - action: Closed - then: - - removeLabel: - label: Needs-Triage - description: -onFailure: -onSuccess: diff --git a/.github/policies/scheduledSearch.closeNoRecentActivity.yml b/.github/policies/scheduledSearch.closeNoRecentActivity.yml @@ -0,0 +1,67 @@ +id: scheduledSearch.closeNoRecentActivity +name: GitOps.PullRequestIssueManagement +description: Closes issues that are inactive +owner: +resource: repository +disabled: false +where: +configuration: + resourceManagementConfiguration: + scheduledSearches: + - description: >- + Search for PR where - + * Pull Request is Open + * Pull request has the label No-Recent-Activity + * Pull request has the label Needs-Author-Feedback + * Pull request does not have the label Blocking-Issue + * Has not had activity in the last 7 days + + Then - + * Close the PR + frequencies: + - hourly: + hour: 6 + filters: + - isPullRequest + - isOpen + - hasLabel: + label: No-Recent-Activity + - hasLabel: + label: Needs-Author-Feedback + - isNotLabeledWith: + label: Blocking-Issue + - noActivitySince: + days: 7 + actions: + - closeIssue + - description: >- + Search for Issues where - + * Issue is Open + * Issue has the label No-Recent-Activity + * Issue has the label Needs-Author-Feedback + * Issue does not have the label Blocking-Issue + * Issue does not have the label Issue-Feature + * Has not had activity in the last 7 days + + Then - + * Close the Issue + frequencies: + - hourly: + hour: 6 + filters: + - isIssue + - isOpen + - hasLabel: + label: No-Recent-Activity + - hasLabel: + label: Needs-Author-Feedback + - isNotLabeledWith: + label: Blocking-Issue + - isNotLabeledWith: + label: Issue-Feature + - noActivitySince: + days: 7 + actions: + - closeIssue +onFailure: +onSuccess: diff --git a/.github/policies/scheduledSearch.markNoRecentActivity.yml b/.github/policies/scheduledSearch.markNoRecentActivity.yml @@ -0,0 +1,69 @@ +id: scheduledSearch.closeNoRecentActivity +name: GitOps.PullRequestIssueManagement +description: Markss issues that are inactive +owner: +resource: repository +disabled: false +where: +configuration: + resourceManagementConfiguration: + scheduledSearches: + - description: >- + Search for PR where - + * Pull Request is Open + * Pull request does not have the label No-Recent-Activity + * Pull request does not have the label Blocking-Issue + * Pull request has the label Needs-Author-Feedback + * Has not had activity in the last 7 days + + Then - + * Add No-Recent-Activity label + frequencies: + - hourly: + hour: 6 + filters: + - isPullRequest + - isOpen + - isNotLabeledWith: + label: No-Recent-Activity + - isNotLabeledWith: + label: Blocking-Issue + - hasLabel: + label: Needs-Author-Feedback + - noActivitySince: + days: 7 + actions: + - addLabel: + label: No-Recent-Activity + - description: >- + Search for Issues where - + * Issue is Open + * Issue has the label Needs-Author-Feedback + * Issue does not have the label No-Recent-Activity + * Issue does not have the label Blocking-Issue + * Issue does not have the label Issue-Feature + * Has not had activity in the last 7 days + + Then - + * Close the Issue + frequencies: + - hourly: + hour: 6 + filters: + - isIssue + - isOpen + - hasLabel: + label: Needs-Author-Feedback + - isNotLabeledWith: + label: No-Recent-Activity + - isNotLabeledWith: + label: Blocking-Issue + - isNotLabeledWith: + label: Issue-Feature + - noActivitySince: + days: 7 + actions: + - addLabel: + label: No-Recent-Activity +onFailure: +onSuccess: