From a81a5ab5209913ec16bfb2a1e79d8f33bae21f30 Mon Sep 17 00:00:00 2001 From: "dotnet-policy-service[bot]" <123482357+dotnet-policy-service[bot]@users.noreply.github.com> Date: Fri, 15 Mar 2024 17:25:15 +0200 Subject: [PATCH] FabricBot: Onboarding to GitOps.ResourceManagement because of FabricBot decommissioning (#2799) * Add prIssueManagement.yml to onboard repo to GitOps.ResourceManagement as FabricBot replacement Details on the replacement service and the syntax of the new yaml configuration file is available publicly at: https://microsoft.github.io/GitOps/policies/resource-management.html Please review and merge this PR to complete the process of onboarding to the new service. * Deleting fabricbot.json --------- Co-authored-by: dotnet-policy-service[bot] <123482357+dotnet-policy-service[bot]@users.noreply.github.com> --- .github/fabricbot.json | 2834 ----------------------- .github/policies/resourceManagement.yml | 562 +++++ 2 files changed, 562 insertions(+), 2834 deletions(-) delete mode 100644 .github/fabricbot.json create mode 100644 .github/policies/resourceManagement.yml diff --git a/.github/fabricbot.json b/.github/fabricbot.json deleted file mode 100644 index a42cda55a..000000000 --- a/.github/fabricbot.json +++ /dev/null @@ -1,2834 +0,0 @@ -{ - "version": "1.0", - "tasks": [ - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssueCommentResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "operator": "not", - "operands": [ - { - "name": "isOpen", - "parameters": {} - } - ] - }, - { - "name": "isAction", - "parameters": { - "action": "created" - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "status/no-recent-activity" - } - }, - { - "operator": "or", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "status/needs-info" - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "status/needs-repro" - } - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "noActivitySince", - "parameters": { - "days": 7 - } - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "isCloseAndComment", - "parameters": {} - } - ] - }, - { - "name": "isActivitySender", - "parameters": { - "user": { - "type": "author" - } - } - }, - { - "name": "activitySenderHasPermissions", - "parameters": { - "permissions": "none" - } - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issue_comment" - ], - "taskName": "[Idle Issue Management] For issues closed due to inactivity, re-open an issue if issue author posts a reply within 7 days.", - "actions": [ - { - "name": "reopenIssue", - "parameters": {} - }, - { - "name": "removeLabel", - "parameters": { - "label": "status/no-recent-activity" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "status/needs-info" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "status/needs-repro" - } - }, - { - "name": "addLabel", - "parameters": { - "label": "status/needs-attention" - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssueCommentResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "created" - } - }, - { - "operator": "not", - "operands": [ - { - "name": "isOpen", - "parameters": {} - } - ] - }, - { - "name": "activitySenderHasPermissions", - "parameters": { - "permissions": "read" - } - }, - { - "name": "noActivitySince", - "parameters": { - "days": 7 - } - }, - { - "operator": "not", - "operands": [ - { - "name": "isCloseAndComment", - "parameters": {} - } - ] - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issue_comment" - ], - "taskName": "[Closed Issue Management] For issues closed with no activity over 7 days, ask non-contributor to consider opening a new issue instead.", - "actions": [ - { - "name": "addReply", - "parameters": { - "comment": "Hello lovely human, thank you for your comment on this issue. Because this issue has been closed for a period of time, please strongly consider opening a new issue linking to this issue instead to ensure better visibility of your comment. Thank you!" - } - } - ] - } - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "frequency": [ - { - "weekDay": 0, - "hours": [ - 1, - 4, - 7, - 10, - 13, - 16, - 19, - 22 - ], - "timezoneOffset": -8 - }, - { - "weekDay": 1, - "hours": [ - 1, - 4, - 7, - 10, - 13, - 16, - 19, - 22 - ], - "timezoneOffset": -8 - }, - { - "weekDay": 2, - "hours": [ - 1, - 4, - 7, - 10, - 13, - 16, - 19, - 22 - ], - "timezoneOffset": -8 - }, - { - "weekDay": 3, - "hours": [ - 1, - 4, - 7, - 10, - 13, - 16, - 19, - 22 - ], - "timezoneOffset": -8 - }, - { - "weekDay": 4, - "hours": [ - 1, - 4, - 7, - 10, - 13, - 16, - 19, - 22 - ], - "timezoneOffset": -8 - }, - { - "weekDay": 5, - "hours": [ - 1, - 4, - 7, - 10, - 13, - 16, - 19, - 22 - ], - "timezoneOffset": -8 - }, - { - "weekDay": 6, - "hours": [ - 1, - 4, - 7, - 10, - 13, - 16, - 19, - 22 - ], - "timezoneOffset": -8 - } - ], - "searchTerms": [ - { - "name": "isClosed", - "parameters": {} - }, - { - "name": "noActivitySince", - "parameters": { - "days": 30 - } - }, - { - "name": "isUnlocked", - "parameters": {} - }, - { - "name": "isIssue", - "parameters": {} - } - ], - "taskName": "[Closed Issue Management] Lock issues closed without activity for over 30 days", - "actions": [ - { - "name": "lockIssue", - "parameters": { - "reason": "resolved" - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssueCommentResponder", - "version": "1.0", - "config": { - "taskName": "[Idle Issue Management] Replace needs author feedback label with needs attention label when the author comments on an issue", - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "created" - } - }, - { - "operator": "or", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "status/needs-info" - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "status/needs-repro" - } - } - ] - }, - { - "name": "isOpen", - "parameters": {} - }, - { - "operator": "or", - "operands": [ - { - "operator": "and", - "operands": [ - { - "operator": "not", - "operands": [ - { - "name": "activitySenderHasPermissions", - "parameters": { - "permissions": "write" - } - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "activitySenderHasPermissions", - "parameters": { - "permissions": "admin" - } - } - ] - } - ] - }, - { - "name": "isActivitySender", - "parameters": { - "user": { - "type": "author" - } - } - } - ] - } - ] - }, - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "status/needs-attention" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "status/needs-info" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "status/needs-repro" - } - } - ], - "eventType": "issue", - "eventNames": [ - "issue_comment" - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "config": { - "taskName": "[Closed Issue Management] Remove no recent activity label from issues", - "conditions": { - "operator": "and", - "operands": [ - { - "operator": "not", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "closed" - } - } - ] - }, - { - "name": "hasLabel", - "parameters": { - "label": "status/no-recent-activity" - } - } - ] - }, - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "status/no-recent-activity" - } - } - ], - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssueCommentResponder", - "version": "1.0", - "config": { - "taskName": "[Idle Issue Management] Remove no recent activity label when an issue is commented on", - "conditions": { - "operator": "and", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "status/no-recent-activity" - } - } - ] - }, - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "status/no-recent-activity" - } - } - ], - "eventType": "issue", - "eventNames": [ - "issue_comment" - ] - } - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "taskName": "[Idle Issue Management] Close stale `status/needs-info` issues", - "frequency": [ - { - "weekDay": 1, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] - }, - { - "weekDay": 2, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] - }, - { - "weekDay": 3, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] - }, - { - "weekDay": 4, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] - }, - { - "weekDay": 5, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] - } - ], - "searchTerms": [ - { - "name": "isIssue", - "parameters": {} - }, - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "hasLabel", - "parameters": { - "label": "status/needs-info" - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "status/no-recent-activity" - } - }, - { - "name": "noActivitySince", - "parameters": { - "days": 3 - } - } - ], - "actions": [ - { - "name": "closeIssue", - "parameters": {} - } - ] - } - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "taskName": "[Idle Issue Management] Close stale `status/needs-repro` issues", - "frequency": [ - { - "weekDay": 1, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] - }, - { - "weekDay": 2, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] - }, - { - "weekDay": 3, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] - }, - { - "weekDay": 4, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] - }, - { - "weekDay": 5, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] - } - ], - "searchTerms": [ - { - "name": "isIssue", - "parameters": {} - }, - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "hasLabel", - "parameters": { - "label": "status/needs-repro" - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "status/no-recent-activity" - } - }, - { - "name": "noActivitySince", - "parameters": { - "days": 3 - } - } - ], - "actions": [ - { - "name": "closeIssue", - "parameters": {} - } - ] - } - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "taskName": "[Idle Issue Management] Add no recent activity label to `status/needs-info` issues", - "frequency": [ - { - "weekDay": 1, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] - }, - { - "weekDay": 2, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] - }, - { - "weekDay": 3, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] - }, - { - "weekDay": 4, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] - }, - { - "weekDay": 5, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] - } - ], - "searchTerms": [ - { - "name": "isIssue", - "parameters": {} - }, - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "hasLabel", - "parameters": { - "label": "status/needs-info" - } - }, - { - "name": "noActivitySince", - "parameters": { - "days": 4 - } - }, - { - "name": "noLabel", - "parameters": { - "label": "status/no-recent-activity" - } - } - ], - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "status/no-recent-activity" - } - }, - { - "name": "addReply", - "parameters": { - "comment": "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**. If it *is* closed, feel free to comment when you are able to provide the additional information and we will re-investigate." - } - } - ] - } - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "taskName": "[Idle Issue Management] Add no recent activity label to `status/needs-repro` issues", - "frequency": [ - { - "weekDay": 1, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] - }, - { - "weekDay": 2, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] - }, - { - "weekDay": 3, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] - }, - { - "weekDay": 4, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] - }, - { - "weekDay": 5, - "hours": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23 - ] - } - ], - "searchTerms": [ - { - "name": "isIssue", - "parameters": {} - }, - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "hasLabel", - "parameters": { - "label": "status/needs-repro" - } - }, - { - "name": "noActivitySince", - "parameters": { - "days": 4 - } - }, - { - "name": "noLabel", - "parameters": { - "label": "status/no-recent-activity" - } - } - ], - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "status/no-recent-activity" - } - }, - { - "name": "addReply", - "parameters": { - "comment": "This issue has been automatically marked as stale because it has been marked as requiring author feedback to reproduce the issue but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**. If it *is* closed, feel free to comment when you are able to provide the additional information and we will re-investigate." - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "opened" - } - }, - { - "name": "isActivitySender", - "parameters": { - "user": "dotnet-maestro[bot]", - "association": "CONTRIBUTOR" - } - }, - { - "name": "titleContains", - "parameters": { - "titlePattern": "Update dependencies" - } - } - ] - }, - "eventType": "pull_request", - "eventNames": [ - "pull_request", - "issues", - "project_card" - ], - "taskName": "[Infrastructure PRs] Add area-infrastructure label to dependency update Pull Requests", - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "area/infrastructure 🏗️" - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "addedToMilestone", - "parameters": { - "milestoneName": "Backlog" - } - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Comment: Issue moved to Backlog", - "actions": [ - { - "name": "addReply", - "parameters": { - "comment": "We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time." - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "labelAdded", - "parameters": { - "label": "status/needs-info" - } - } - ] - }, - "eventType": "pull_request", - "eventNames": [ - "pull_request", - "issues", - "project_card" - ], - "taskName": "Replace `status/needs-info` with `status/pr-needs-author-input` for PRs", - "actions": [ - { - "name": "addReply", - "parameters": { - "comment": "Hello. I see that you've just added `status/needs-info` label to this PR.\nThat label is for Issues and not for PRs. Don't worry, I'm going to replace it with the correct one." - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "status/needs-info" - } - }, - { - "name": "addLabel", - "parameters": { - "label": "status/pr-needs-author-input" - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "labelAdded", - "parameters": { - "label": "status/needs-repro" - } - } - ] - }, - "eventType": "pull_request", - "eventNames": [ - "pull_request", - "issues", - "project_card" - ], - "taskName": "Remove `status/needs-repro` from PRs", - "actions": [ - { - "name": "addReply", - "parameters": { - "comment": "Hello. I see that you've just added `status/needs-repro` label to this PR.\nThat label is for Issues and not for PRs, so I removed it." - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "status/needs-repro" - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "labelAdded", - "parameters": { - "label": "status/needs-info" - } - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Add comment when `status/needs-info` is applied to issue", - "actions": [ - { - "name": "addReply", - "parameters": { - "comment": "Hi @${issueAuthor}. We have added the `status/needs-info` label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time." - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "labelAdded", - "parameters": { - "label": "status/needs-repro" - } - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Add comment when `status/needs-repro` is applied to issue", - "actions": [ - { - "name": "addReply", - "parameters": { - "comment": "Hi @${issueAuthor}. We have added the `status/needs-repro` label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone.\n\nThis issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time." - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "or", - "operands": [ - { - "name": "labelAdded", - "parameters": { - "label": "control-newcontrol" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "control-general" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "control-webview" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "control-datetimepicker" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "control-picker" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "control-switch" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "control-dualscreen" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "control-checkbox" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "control-border" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "control-label" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "control-button" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "control-dialogalert" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "control-entry" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "control-frame" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "control-stepper" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "control-refreshview" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "control-image" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "control-activityindicator" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "control-radiobutton" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "control-slider" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "control-progressbar" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "control-pages" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "control-map" - } - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Add area/controls label when any 'control-X' label is applied to the issue", - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "area/controls 🎮" - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "or", - "operands": [ - { - "name": "labelAdded", - "parameters": { - "label": "control-newcontrol" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "control-general" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "control-webview" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "control-datetimepicker" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "control-picker" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "control-switch" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "control-dualscreen" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "control-checkbox" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "control-border" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "control-label" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "control-button" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "control-dialogalert" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "control-entry" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "control-frame" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "control-stepper" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "control-refreshview" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "control-image" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "control-activityindicator" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "control-radiobutton" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "control-slider" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "control-progressbar" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "control-pages" - } - }, - { - "name": "labelAdded", - "parameters": { - "label": "control-map" - } - } - ] - }, - "eventType": "pull_request", - "eventNames": [ - "pull_request", - "issues", - "project_card" - ], - "taskName": "Add area/controls label when any 'control-X' label is applied to the PR", - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "area/controls 🎮" - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "opened" - } - }, - { - "operator": "or", - "operands": [ - { - "name": "isActivitySender", - "parameters": { - "user": "alexeystrakh" - } - }, - { - "name": "isActivitySender", - "parameters": { - "user": "alexkblount" - } - }, - { - "name": "isActivitySender", - "parameters": { - "user": "BenBtg" - } - }, - { - "name": "isActivitySender", - "parameters": { - "user": "DeanFaizal" - } - }, - { - "name": "isActivitySender", - "parameters": { - "user": "jgold6" - } - }, - { - "name": "isActivitySender", - "parameters": { - "user": "jmongaras" - } - }, - { - "name": "isActivitySender", - "parameters": { - "user": "jonlipsky" - } - }, - { - "name": "isActivitySender", - "parameters": { - "user": "JoonghyunCho" - } - }, - { - "name": "isActivitySender", - "parameters": { - "user": "juanlao" - } - }, - { - "name": "isActivitySender", - "parameters": { - "user": "migueBarrera" - } - }, - { - "name": "isActivitySender", - "parameters": { - "user": "mikeparker104" - } - }, - { - "name": "isActivitySender", - "parameters": { - "user": "myroot" - } - }, - { - "name": "isActivitySender", - "parameters": { - "user": "rookiejava" - } - }, - { - "name": "isActivitySender", - "parameters": { - "user": "shyunMin" - } - }, - { - "name": "isActivitySender", - "parameters": { - "user": "sung-su" - } - }, - { - "name": "isActivitySender", - "parameters": { - "user": "Sweekriti91" - } - } - ] - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Add 'partner' label when issue is opened by a partner", - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "partner" - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "labelAdded", - "parameters": { - "label": "status/move-to-vs-feedback" - } - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Ask user to use VS Feedback for VS issues", - "actions": [ - { - "name": "addReply", - "parameters": { - "comment": "Thanks for the issue report @${issueAuthor}! This issue appears to be a problem with Visual Studio, so we ask that you use the VS feedback tool to report the issue. That way it will get to the routed to the team that owns this experience in VS.\n\nIf you encounter a problem with Visual Studio, we want to know about it so that we can diagnose and fix it. By using the Report a Problem tool, you can collect detailed information about the problem, and send it to Microsoft with just a few button clicks.\n\n1. Go to the [VS feedback tool](https://docs.microsoft.com/visualstudio/ide/how-to-report-a-problem-with-visual-studio?view=vs-2022) to report the issue\n2. Close this bug, and consider adding a link to the VS Feedback issue so that others can follow its activity there.\n\nThis issue will be automatically closed in 3 days if there are no further comments." - } - } - ] - } - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "frequency": [ - { - "weekDay": 0, - "hours": [ - 0, - 6, - 12, - 18 - ] - }, - { - "weekDay": 1, - "hours": [ - 0, - 6, - 12, - 18 - ] - }, - { - "weekDay": 2, - "hours": [ - 0, - 6, - 12, - 18 - ] - }, - { - "weekDay": 3, - "hours": [ - 0, - 6, - 12, - 18 - ] - }, - { - "weekDay": 4, - "hours": [ - 0, - 6, - 12, - 18 - ] - }, - { - "weekDay": 5, - "hours": [ - 0, - 6, - 12, - 18 - ] - }, - { - "weekDay": 6, - "hours": [ - 0, - 6, - 12, - 18 - ] - } - ], - "searchTerms": [ - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "hasLabel", - "parameters": { - "label": "status/move-to-vs-feedback" - } - }, - { - "name": "noActivitySince", - "parameters": { - "days": 3 - } - } - ], - "taskName": "Close `status/move-to-vs-feedback` after 3 days of no activity", - "actions": [ - { - "name": "addReply", - "parameters": { - "comment": "This issue is being closed due to inactivity. If this issue is still affecting you, please follow the steps above to use the VS Feedback Tool to report the issue." - } - }, - { - "name": "closeIssue", - "parameters": {} - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssueCommentResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "isAction", - "parameters": { - "action": "created" - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "status/move-to-vs-feedback" - } - }, - { - "operator": "not", - "operands": [ - { - "name": "noActivitySince", - "parameters": { - "days": 3 - } - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "isCloseAndComment", - "parameters": {} - } - ] - }, - { - "name": "isActivitySender", - "parameters": { - "user": { - "type": "author" - } - } - }, - { - "name": "activitySenderHasPermissions", - "parameters": { - "permissions": "none" - } - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issue_comment" - ], - "taskName": "For issues labeled with `status/move-to-vs-feedback` mark as `status/needs-attention` if there is activity", - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "status/move-to-vs-feedback" - } - }, - { - "name": "addLabel", - "parameters": { - "label": "status/needs-attention" - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isAction", - "parameters": { - "user": "roubachof", - "action": "opened" - } - }, - { - "operator": "or", - "operands": [ - { - "name": "isActivitySender", - "parameters": { - "user": "roubachof" - } - }, - { - "name": "isActivitySender", - "parameters": { - "user": "davidbritch" - } - } - ] - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Add 'i/great-reporter' when issue is opened by an author we know opens high quality issues", - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "i/great-reporter" - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "labelAdded", - "parameters": { - "label": "status/try-latest-version" - } - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Add comment when `status/try-latest-version` is applied to the issue", - "actions": [ - { - "name": "addReply", - "parameters": { - "comment": "Hi @${issueAuthor}. We have added the `status/try-latest-version` label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version.\n\nIf the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository.\n\nThis issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time." - } - } - ] - } - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "frequency": [ - { - "weekDay": 0, - "hours": [ - 3, - 15 - ], - "timezoneOffset": 2 - }, - { - "weekDay": 1, - "hours": [ - 3, - 15 - ], - "timezoneOffset": 2 - }, - { - "weekDay": 2, - "hours": [ - 3, - 15 - ], - "timezoneOffset": 2 - }, - { - "weekDay": 3, - "hours": [ - 3, - 15 - ], - "timezoneOffset": 2 - }, - { - "weekDay": 4, - "hours": [ - 3, - 15 - ], - "timezoneOffset": 2 - }, - { - "weekDay": 5, - "hours": [ - 3, - 15 - ], - "timezoneOffset": 2 - }, - { - "weekDay": 6, - "hours": [ - 3, - 15 - ], - "timezoneOffset": 2 - } - ], - "searchTerms": [ - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "hasLabel", - "parameters": { - "label": "status/try-latest-version" - } - }, - { - "name": "noActivitySince", - "parameters": { - "days": 7 - } - } - ], - "taskName": "[Idle Issue Management] Close stale `status/try-latest-version` issues", - "actions": [ - { - "name": "closeIssue", - "parameters": {} - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "activitySenderHasPermissions", - "parameters": { - "permissions": "read" - } - }, - { - "operator": "not", - "operands": [ - { - "name": "isActivitySender", - "parameters": { - "user": "dotnet-maestro" - } - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "isActivitySender", - "parameters": { - "user": "dotnet-maestro-bot" - } - } - ] - }, - { - "name": "isAction", - "parameters": { - "action": "opened" - } - } - ] - }, - "eventType": "pull_request", - "eventNames": [ - "pull_request", - "issues", - "project_card" - ], - "taskName": "Add 'community ✨' label to community contributions", - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "community ✨" - } - }, - { - "name": "addReactionToIssue", - "parameters": { - "reaction": "heart" - } - }, - { - "name": "addReply", - "parameters": { - "comment": "Hey there @${issueAuthor}! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed." - } - } - ] - } - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "frequency": [ - { - "weekDay": 0, - "hours": [ - 2, - 5, - 8, - 11, - 14, - 17, - 20, - 23 - ], - "timezoneOffset": 2 - }, - { - "weekDay": 1, - "hours": [ - 2, - 5, - 8, - 11, - 14, - 17, - 20, - 23 - ], - "timezoneOffset": 2 - }, - { - "weekDay": 2, - "hours": [ - 2, - 5, - 8, - 11, - 14, - 17, - 20, - 23 - ], - "timezoneOffset": 2 - }, - { - "weekDay": 3, - "hours": [ - 2, - 5, - 8, - 11, - 14, - 17, - 20, - 23 - ], - "timezoneOffset": 2 - }, - { - "weekDay": 4, - "hours": [ - 2, - 5, - 8, - 11, - 14, - 17, - 20, - 23 - ], - "timezoneOffset": 2 - }, - { - "weekDay": 5, - "hours": [ - 2, - 5, - 8, - 11, - 14, - 17, - 20, - 23 - ], - "timezoneOffset": 2 - }, - { - "weekDay": 6, - "hours": [ - 2, - 5, - 8, - 11, - 14, - 17, - 20, - 23 - ], - "timezoneOffset": 2 - } - ], - "searchTerms": [ - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "isPr", - "parameters": {} - }, - { - "name": "hasLabel", - "parameters": { - "label": "status/pr-needs-author-input" - } - }, - { - "name": "noActivitySince", - "parameters": { - "days": 10 - } - }, - { - "name": "noLabel", - "parameters": { - "label": "stale" - } - } - ], - "taskName": "Stale PR reminder", - "actions": [ - { - "name": "addReply", - "parameters": { - "comment": "Hi @${issueAuthor}.\nIt seems you haven't touched this PR for the last two weeks. To avoid accumulating old PRs, we're marking it as `stale`. As a result, it will be closed if no further activity occurs **within 4 days of this comment**." - } - }, - { - "name": "addLabel", - "parameters": { - "label": "stale" - } - } - ] - } - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "frequency": [ - { - "weekDay": 0, - "hours": [ - 3, - 7, - 11, - 15, - 19, - 23 - ], - "timezoneOffset": 2 - }, - { - "weekDay": 1, - "hours": [ - 3, - 7, - 11, - 15, - 19, - 23 - ], - "timezoneOffset": 2 - }, - { - "weekDay": 2, - "hours": [ - 3, - 7, - 11, - 15, - 19, - 23 - ], - "timezoneOffset": 2 - }, - { - "weekDay": 3, - "hours": [ - 3, - 7, - 11, - 15, - 19, - 23 - ], - "timezoneOffset": 2 - }, - { - "weekDay": 4, - "hours": [ - 3, - 7, - 11, - 15, - 19, - 23 - ], - "timezoneOffset": 2 - }, - { - "weekDay": 5, - "hours": [ - 3, - 7, - 11, - 15, - 19, - 23 - ], - "timezoneOffset": 2 - }, - { - "weekDay": 6, - "hours": [ - 3, - 7, - 11, - 15, - 19, - 23 - ], - "timezoneOffset": 2 - } - ], - "searchTerms": [ - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "isPr", - "parameters": {} - }, - { - "name": "hasLabel", - "parameters": { - "label": "status/pr-needs-author-input" - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "stale" - } - }, - { - "name": "noActivitySince", - "parameters": { - "days": 4 - } - } - ], - "taskName": "Close stale PRs", - "actions": [ - { - "name": "closeIssue", - "parameters": {} - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "stale" - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "status/pr-needs-author-input" - } - }, - { - "name": "isActivitySender", - "parameters": { - "user": { - "type": "author" - } - } - }, - { - "operator": "not", - "operands": [ - { - "name": "activitySenderHasPermissions", - "parameters": { - "permissions": "write" - } - } - ] - } - ] - }, - "eventType": "pull_request", - "eventNames": [ - "pull_request", - "issues", - "project_card" - ], - "taskName": "Revitalize stale PR and reopen", - "actions": [ - { - "name": "reopenIssue", - "parameters": {} - }, - { - "name": "removeLabel", - "parameters": { - "label": "stale" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "status/pr-needs-author-input" - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "labelAdded", - "parameters": { - "label": "status/pr-needs-author-input" - } - } - ] - }, - "eventType": "pull_request", - "eventNames": [ - "pull_request", - "issues", - "project_card" - ], - "taskName": "Add comment when `status/pr-needs-author-input` is applied to PR", - "actions": [ - { - "name": "addReply", - "parameters": { - "comment": "Hi @${issueAuthor}. We have added the `status/pr-needs-author-input` label to this issue, which indicates that we have an open question/action for you before we can take further action. This PRwill be closed automatically in 14 days if we do not hear back from you by then - please feel free to re-open it if you come back to this PR after that time." - } - } - ] - } - } - ], - "userGroups": [] -} \ No newline at end of file diff --git a/.github/policies/resourceManagement.yml b/.github/policies/resourceManagement.yml new file mode 100644 index 000000000..5dc7e5b35 --- /dev/null +++ b/.github/policies/resourceManagement.yml @@ -0,0 +1,562 @@ +id: +name: GitOps.PullRequestIssueManagement +description: GitOps.PullRequestIssueManagement primitive +owner: +resource: repository +disabled: false +where: +configuration: + resourceManagementConfiguration: + scheduledSearches: + - description: '[Idle Issue Management] Close stale `status/needs-info` issues' + frequencies: + - weekday: + day: Monday + time: 0:0 + - weekday: + day: Tuesday + time: 0:0 + - weekday: + day: Wednesday + time: 0:0 + - weekday: + day: Thursday + time: 0:0 + - weekday: + day: Friday + time: 0:0 + filters: + - isIssue + - isOpen + - hasLabel: + label: status/needs-info + - hasLabel: + label: status/no-recent-activity + - noActivitySince: + days: 3 + actions: + - closeIssue + - description: '[Idle Issue Management] Close stale `status/needs-repro` issues' + frequencies: + - weekday: + day: Monday + time: 0:0 + - weekday: + day: Tuesday + time: 0:0 + - weekday: + day: Wednesday + time: 0:0 + - weekday: + day: Thursday + time: 0:0 + - weekday: + day: Friday + time: 0:0 + filters: + - isIssue + - isOpen + - hasLabel: + label: status/needs-repro + - hasLabel: + label: status/no-recent-activity + - noActivitySince: + days: 3 + actions: + - closeIssue + - description: '[Idle Issue Management] Add no recent activity label to `status/needs-info` issues' + frequencies: + - weekday: + day: Monday + time: 0:0 + - weekday: + day: Tuesday + time: 0:0 + - weekday: + day: Wednesday + time: 0:0 + - weekday: + day: Thursday + time: 0:0 + - weekday: + day: Friday + time: 0:0 + filters: + - isIssue + - isOpen + - hasLabel: + label: status/needs-info + - noActivitySince: + days: 4 + - isNotLabeledWith: + label: status/no-recent-activity + actions: + - addLabel: + label: status/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**. If it *is* closed, feel free to comment when you are able to provide the additional information and we will re-investigate. + - description: '[Idle Issue Management] Add no recent activity label to `status/needs-repro` issues' + frequencies: + - weekday: + day: Monday + time: 0:0 + - weekday: + day: Tuesday + time: 0:0 + - weekday: + day: Wednesday + time: 0:0 + - weekday: + day: Thursday + time: 0:0 + - weekday: + day: Friday + time: 0:0 + filters: + - isIssue + - isOpen + - hasLabel: + label: status/needs-repro + - noActivitySince: + days: 4 + - isNotLabeledWith: + label: status/no-recent-activity + actions: + - addLabel: + label: status/no-recent-activity + - addReply: + reply: This issue has been automatically marked as stale because it has been marked as requiring author feedback to reproduce the issue but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**. If it *is* closed, feel free to comment when you are able to provide the additional information and we will re-investigate. + - description: Close `status/move-to-vs-feedback` after 3 days of no activity + frequencies: + - hourly: + hour: 6 + filters: + - isOpen + - hasLabel: + label: status/move-to-vs-feedback + - noActivitySince: + days: 3 + actions: + - addReply: + reply: This issue is being closed due to inactivity. If this issue is still affecting you, please follow the steps above to use the VS Feedback Tool to report the issue. + - closeIssue + - description: '[Idle Issue Management] Close stale `status/try-latest-version` issues' + frequencies: + - hourly: + hour: 12 + filters: + - isOpen + - hasLabel: + label: status/try-latest-version + - noActivitySince: + days: 7 + actions: + - closeIssue + - description: Stale PR reminder + frequencies: + - hourly: + hour: 3 + filters: + - isOpen + - isPullRequest + - hasLabel: + label: status/pr-needs-author-input + - noActivitySince: + days: 10 + - isNotLabeledWith: + label: stale + actions: + - addReply: + reply: >- + Hi @${issueAuthor}. + + It seems you haven't touched this PR for the last two weeks. To avoid accumulating old PRs, we're marking it as `stale`. As a result, it will be closed if no further activity occurs **within 4 days of this comment**. + - addLabel: + label: stale + - description: Close stale PRs + frequencies: + - hourly: + hour: 4 + filters: + - isOpen + - isPullRequest + - hasLabel: + label: status/pr-needs-author-input + - hasLabel: + label: stale + - noActivitySince: + days: 4 + actions: + - closeIssue + eventResponderTasks: + - if: + - payloadType: Issue_Comment + - isAction: + action: Created + - or: + - hasLabel: + label: status/needs-info + - hasLabel: + label: status/needs-repro + - isOpen + - or: + - and: + - not: + activitySenderHasPermission: + permission: Write + - not: + activitySenderHasPermission: + permission: Admin + - isActivitySender: + issueAuthor: True + then: + - addLabel: + label: status/needs-attention + - removeLabel: + label: status/needs-info + - removeLabel: + label: status/needs-repro + description: '[Idle Issue Management] Replace needs author feedback label with needs attention label when the author comments on an issue' + - if: + - payloadType: Issues + - not: + isAction: + action: Closed + - hasLabel: + label: status/no-recent-activity + then: + - removeLabel: + label: status/no-recent-activity + description: '[Closed Issue Management] Remove no recent activity label from issues' + - if: + - payloadType: Issue_Comment + - hasLabel: + label: status/no-recent-activity + then: + - removeLabel: + label: status/no-recent-activity + description: '[Idle Issue Management] Remove no recent activity label when an issue is commented on' + - if: + - payloadType: Pull_Request + - isAction: + action: Opened + - isActivitySender: + user: dotnet-maestro[bot] + issueAuthor: False + - titleContains: + pattern: Update dependencies + isRegex: False + then: + - addLabel: + label: "area/infrastructure \U0001F3D7️" + description: '[Infrastructure PRs] Add area-infrastructure label to dependency update Pull Requests' + - if: + - payloadType: Pull_Request + - labelAdded: + label: status/needs-info + then: + - addReply: + reply: >- + Hello. I see that you've just added `status/needs-info` label to this PR. + + That label is for Issues and not for PRs. Don't worry, I'm going to replace it with the correct one. + - removeLabel: + label: status/needs-info + - addLabel: + label: status/pr-needs-author-input + description: Replace `status/needs-info` with `status/pr-needs-author-input` for PRs + - if: + - payloadType: Pull_Request + - labelAdded: + label: status/needs-repro + then: + - addReply: + reply: >- + Hello. I see that you've just added `status/needs-repro` label to this PR. + + That label is for Issues and not for PRs, so I removed it. + - removeLabel: + label: status/needs-repro + description: Remove `status/needs-repro` from PRs + - if: + - payloadType: Issues + - labelAdded: + label: status/needs-info + then: + - addReply: + reply: Hi @${issueAuthor}. We have added the `status/needs-info` label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. + description: Add comment when `status/needs-info` is applied to issue + - if: + - payloadType: Issues + - labelAdded: + label: status/needs-repro + then: + - addReply: + reply: >- + Hi @${issueAuthor}. We have added the `status/needs-repro` label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. + + + This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. + description: Add comment when `status/needs-repro` is applied to issue + - if: + - payloadType: Issues + - or: + - labelAdded: + label: control-newcontrol + - labelAdded: + label: control-general + - labelAdded: + label: control-webview + - labelAdded: + label: control-datetimepicker + - labelAdded: + label: control-picker + - labelAdded: + label: control-switch + - labelAdded: + label: control-dualscreen + - labelAdded: + label: control-checkbox + - labelAdded: + label: control-border + - labelAdded: + label: control-label + - labelAdded: + label: control-button + - labelAdded: + label: control-dialogalert + - labelAdded: + label: control-entry + - labelAdded: + label: control-frame + - labelAdded: + label: control-stepper + - labelAdded: + label: control-refreshview + - labelAdded: + label: control-image + - labelAdded: + label: control-activityindicator + - labelAdded: + label: control-radiobutton + - labelAdded: + label: control-slider + - labelAdded: + label: control-progressbar + - labelAdded: + label: control-pages + - labelAdded: + label: control-map + then: + - addLabel: + label: "area/controls \U0001F3AE" + description: Add area/controls label when any 'control-X' label is applied to the issue + - if: + - payloadType: Pull_Request + - or: + - labelAdded: + label: control-newcontrol + - labelAdded: + label: control-general + - labelAdded: + label: control-webview + - labelAdded: + label: control-datetimepicker + - labelAdded: + label: control-picker + - labelAdded: + label: control-switch + - labelAdded: + label: control-dualscreen + - labelAdded: + label: control-checkbox + - labelAdded: + label: control-border + - labelAdded: + label: control-label + - labelAdded: + label: control-button + - labelAdded: + label: control-dialogalert + - labelAdded: + label: control-entry + - labelAdded: + label: control-frame + - labelAdded: + label: control-stepper + - labelAdded: + label: control-refreshview + - labelAdded: + label: control-image + - labelAdded: + label: control-activityindicator + - labelAdded: + label: control-radiobutton + - labelAdded: + label: control-slider + - labelAdded: + label: control-progressbar + - labelAdded: + label: control-pages + - labelAdded: + label: control-map + then: + - addLabel: + label: "area/controls \U0001F3AE" + description: Add area/controls label when any 'control-X' label is applied to the PR + - if: + - payloadType: Issues + - isAction: + action: Opened + - or: + - isActivitySender: + user: alexeystrakh + issueAuthor: False + - isActivitySender: + user: alexkblount + issueAuthor: False + - isActivitySender: + user: BenBtg + issueAuthor: False + - isActivitySender: + user: DeanFaizal + issueAuthor: False + - isActivitySender: + user: jgold6 + issueAuthor: False + - isActivitySender: + user: jmongaras + issueAuthor: False + - isActivitySender: + user: jonlipsky + issueAuthor: False + - isActivitySender: + user: JoonghyunCho + issueAuthor: False + - isActivitySender: + user: juanlao + issueAuthor: False + - isActivitySender: + user: migueBarrera + issueAuthor: False + - isActivitySender: + user: mikeparker104 + issueAuthor: False + - isActivitySender: + user: myroot + issueAuthor: False + - isActivitySender: + user: rookiejava + issueAuthor: False + - isActivitySender: + user: shyunMin + issueAuthor: False + - isActivitySender: + user: sung-su + issueAuthor: False + - isActivitySender: + user: Sweekriti91 + issueAuthor: False + then: + - addLabel: + label: partner + description: Add 'partner' label when issue is opened by a partner + - if: + - payloadType: Issues + - isOpen + - labelAdded: + label: status/move-to-vs-feedback + then: + - addReply: + reply: >- + Thanks for the issue report @${issueAuthor}! This issue appears to be a problem with Visual Studio, so we ask that you use the VS feedback tool to report the issue. That way it will get to the routed to the team that owns this experience in VS. + + + If you encounter a problem with Visual Studio, we want to know about it so that we can diagnose and fix it. By using the Report a Problem tool, you can collect detailed information about the problem, and send it to Microsoft with just a few button clicks. + + + 1. Go to the [VS feedback tool](https://docs.microsoft.com/visualstudio/ide/how-to-report-a-problem-with-visual-studio?view=vs-2022) to report the issue + + 2. Close this bug, and consider adding a link to the VS Feedback issue so that others can follow its activity there. + + + This issue will be automatically closed in 3 days if there are no further comments. + description: Ask user to use VS Feedback for VS issues + - if: + - payloadType: Issues + - isAction: + action: Opened + - or: + - isActivitySender: + user: roubachof + issueAuthor: False + - isActivitySender: + user: davidbritch + issueAuthor: False + then: + - addLabel: + label: i/great-reporter + description: Add 'i/great-reporter' when issue is opened by an author we know opens high quality issues + - if: + - payloadType: Issues + - labelAdded: + label: status/try-latest-version + then: + - addReply: + reply: >- + Hi @${issueAuthor}. We have added the `status/try-latest-version` label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version. + + + If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository. + + + This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. + description: Add comment when `status/try-latest-version` is applied to the issue + - if: + - payloadType: Pull_Request + - activitySenderHasPermission: + permission: Read + - not: + isActivitySender: + user: dotnet-maestro + issueAuthor: False + - not: + isActivitySender: + user: dotnet-maestro-bot + issueAuthor: False + - isAction: + action: Opened + then: + - addLabel: + label: community ✨ + - addReply: + reply: Hey there @${issueAuthor}! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. + description: Add 'community ✨' label to community contributions + - if: + - payloadType: Pull_Request + - hasLabel: + label: stale + - hasLabel: + label: status/pr-needs-author-input + - isActivitySender: + issueAuthor: True + - not: + activitySenderHasPermission: + permission: Write + then: + - reopenIssue + - removeLabel: + label: stale + - removeLabel: + label: status/pr-needs-author-input + description: Revitalize stale PR and reopen + - if: + - payloadType: Pull_Request + - labelAdded: + label: status/pr-needs-author-input + then: + - addReply: + reply: Hi @${issueAuthor}. We have added the `status/pr-needs-author-input` label to this issue, which indicates that we have an open question/action for you before we can take further action. This PRwill be closed automatically in 14 days if we do not hear back from you by then - please feel free to re-open it if you come back to this PR after that time. + description: Add comment when `status/pr-needs-author-input` is applied to PR +onFailure: +onSuccess: