From 6637292d51dcb4b71ecf5952732d52772c6c1f78 Mon Sep 17 00:00:00 2001 From: "dotnet-policy-service[bot]" <123482357+dotnet-policy-service[bot]@users.noreply.github.com> Date: Mon, 12 Feb 2024 15:07:40 -0800 Subject: [PATCH] FabricBot: Onboarding to GitOps.ResourceManagement because of FabricBot decommissioning (#13215) --- .github/fabricbot.json | 2345 ----------------------- .github/policies/resourceManagement.yml | 520 +++++ 2 files changed, 520 insertions(+), 2345 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 9231e8a12..000000000 --- a/.github/fabricbot.json +++ /dev/null @@ -1,2345 +0,0 @@ -{ - "version": "1.0", - "tasks": [ - { - "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": "vsfeedback" - } - }, - { - "name": "bodyContains", - "parameters": { - "bodyPattern": "Copied from original issue" - } - }, - { - "name": "bodyContains", - "parameters": { - "bodyPattern": "Issue moved from" - } - } - ] - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "[Manage \"WaitingFor\" labels] [4-1] Tag \"Transferred issue\" if it's transferred from vsfeedback or other github repo.", - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "Transferred issue" - } - }, - { - "name": "addLabel", - "parameters": { - "label": "Triage:Untriaged" - } - } - ] - }, - "disabled": false - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssueCommentResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "created" - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "WaitingForCustomer" - } - }, - { - "name": "isOpen", - "parameters": {} - }, - { - "operator": "or", - "operands": [ - { - "operator": "and", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "Transferred issue" - } - }, - { - "operator": "not", - "operands": [ - { - "name": "activitySenderHasPermissions", - "parameters": { - "permissions": "write" - } - } - ] - } - ] - }, - { - "name": "isActivitySender", - "parameters": { - "user": { - "type": "author" - } - } - } - ] - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issue_comment" - ], - "taskName": "[Manage \"WaitingFor\" labels] [4-2] Replace tag \"WaitingForCustomer\" with \"WaitingForClientTeam\" when the author comments on an issue. Also remove `Status:No recent activity` if it's been set.", - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "WaitingForCustomer" - } - }, - { - "name": "addLabel", - "parameters": { - "label": "WaitingForClientTeam" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "Status:No recent activity" - } - } - ] - }, - "disabled": false - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "closed" - } - }, - { - "operator": "or", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "WaitingForClientTeam" - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "WaitingForCustomer" - } - } - ] - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "[Manage \"WaitingFor\" labels] [4-3] Remove any \"WaitingFor\" label when the issue is closed", - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "WaitingForClientTeam" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "WaitingForCustomer" - } - } - ] - }, - "disabled": false - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssueCommentResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "created" - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "WaitingForClientTeam" - } - }, - { - "name": "isOpen", - "parameters": {} - }, - { - "operator": "or", - "operands": [ - { - "name": "activitySenderHasPermissions", - "parameters": { - "permissions": "write" - } - }, - { - "name": "activitySenderHasPermissions", - "parameters": { - "permissions": "admin" - } - } - ] - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issue_comment" - ], - "taskName": "[Manage \"WaitingFor\" labels] [4-4] Replace tag \"WaitingForClientTeam\" with \"WaitingForCustomer\" when client team comments on an issue.", - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "WaitingForClientTeam" - } - }, - { - "name": "addLabel", - "parameters": { - "label": "WaitingForCustomer" - } - } - ] - }, - "disabled": false - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "frequency": [ - { - "weekDay": 0, - "hours": [ - 0, - 3, - 6, - 9, - 12, - 15, - 18, - 21 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 1, - "hours": [ - 0, - 3, - 6, - 9, - 12, - 15, - 18, - 21 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 2, - "hours": [ - 0, - 3, - 6, - 9, - 12, - 15, - 18, - 21 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 3, - "hours": [ - 0, - 3, - 6, - 9, - 12, - 15, - 18, - 21 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 4, - "hours": [ - 0, - 3, - 6, - 9, - 12, - 15, - 18, - 21 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 5, - "hours": [ - 0, - 3, - 6, - 9, - 12, - 15, - 18, - 21 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 6, - "hours": [ - 0, - 3, - 6, - 9, - 12, - 15, - 18, - 21 - ], - "timezoneOffset": -7 - } - ], - "searchTerms": [ - { - "name": "hasLabel", - "parameters": { - "label": "Community" - } - }, - { - "name": "noActivitySince", - "parameters": { - "days": 30 - } - }, - { - "name": "isPr", - "parameters": {} - }, - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "isDraftPr", - "parameters": { - "value": "false" - } - }, - { - "name": "noLabel", - "parameters": { - "label": "Status:No recent activity" - } - }, - { - "name": "noLabel", - "parameters": { - "label": "Community" - } - } - ], - "taskName": "[stale PR] [5-1] Search for PRs with no activity over 30 days and warn. (except draft PRs and Community PRs)", - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "Status:No recent activity" - } - }, - { - "name": "addReply", - "parameters": { - "comment": "This PR has been automatically marked as stale because it has no activity for **30 days**. It will be closed if no further activity occurs **within another 15 days** of this comment, unless it has a \"Status:Do not auto close\" label. If it is closed, you may reopen it anytime when you're ready again, as long as you don't delete the branch." - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "operator": "not", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "closed" - } - } - ] - }, - { - "name": "hasLabel", - "parameters": { - "label": "Status:No recent activity" - } - } - ] - }, - "eventType": "pull_request", - "eventNames": [ - "pull_request", - "issues", - "project_card" - ], - "taskName": "[stale PR] [5-2] Remove \"Status:No recent activity\" if there is any activity.", - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "Status:No recent activity" - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestCommentResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "Status:No recent activity" - } - } - ] - }, - "eventType": "pull_request", - "eventNames": [ - "issue_comment" - ], - "taskName": "[stale PR] [5-3] Remove \"Status:No recent activity\" if there is any comment.", - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "Status:No recent activity" - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestReviewResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "Status:No recent activity" - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "Community" - } - } - ] - }, - "eventType": "pull_request", - "eventNames": [ - "pull_request_review" - ], - "taskName": "[stale PR] [5-4] Remove \"Status:No recent activity\" if there are any reviews.", - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "Status:No recent activity" - } - } - ] - } - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "frequency": [ - { - "weekDay": 0, - "hours": [ - 2, - 5, - 8, - 11, - 14, - 17, - 20, - 23 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 1, - "hours": [ - 2, - 5, - 8, - 11, - 14, - 17, - 20, - 23 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 2, - "hours": [ - 2, - 5, - 8, - 11, - 14, - 17, - 20, - 23 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 3, - "hours": [ - 2, - 5, - 8, - 11, - 14, - 17, - 20, - 23 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 4, - "hours": [ - 2, - 5, - 8, - 11, - 14, - 17, - 20, - 23 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 5, - "hours": [ - 2, - 5, - 8, - 11, - 14, - 17, - 20, - 23 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 6, - "hours": [ - 2, - 5, - 8, - 11, - 14, - 17, - 20, - 23 - ], - "timezoneOffset": -7 - } - ], - "searchTerms": [ - { - "name": "isPr", - "parameters": {} - }, - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "hasLabel", - "parameters": { - "label": "Status:No recent activity" - } - }, - { - "name": "noLabel", - "parameters": { - "label": "Community" - } - }, - { - "name": "noActivitySince", - "parameters": { - "days": 15 - } - }, - { - "name": "noLabel", - "parameters": { - "label": "Status:Do not auto close" - } - } - ], - "taskName": "[stale PR] [5-5] Close PRs with no activity over 15 days after warn (except Community PRs)", - "actions": [ - { - "name": "closeIssue", - "parameters": {} - } - ] - } - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.0", - "config": { - "frequency": [ - { - "weekDay": 0, - "hours": [ - 6 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 1, - "hours": [ - 6 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 2, - "hours": [ - 6 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 3, - "hours": [ - 6 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 4, - "hours": [ - 6 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 5, - "hours": [ - 6 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 6, - "hours": [ - 6 - ], - "timezoneOffset": -7 - } - ], - "searchTerms": [ - { - "name": "hasLabel", - "parameters": { - "label": "WaitingForCustomer" - } - }, - { - "name": "noActivitySince", - "parameters": { - "days": 14 - } - }, - { - "name": "isIssue", - "parameters": {} - }, - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "noLabel", - "parameters": { - "label": "Status:No recent activity" - } - } - ], - "taskName": "[Manage stale WaitingForCustomer issues] Search for WaitingForCustomer issues with no activity over 14 days and warn.", - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "Status:No recent activity" - } - }, - { - "name": "addReply", - "parameters": { - "comment": "This issue has been automatically marked as stale because we have not received a response in 14 days. It will be closed if no further activity occurs within another 14 days of this comment." - } - } - ] - } - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.0", - "config": { - "frequency": [ - { - "weekDay": 0, - "hours": [ - 6 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 1, - "hours": [ - 6 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 2, - "hours": [ - 6 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 3, - "hours": [ - 6 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 4, - "hours": [ - 6 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 5, - "hours": [ - 6 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 6, - "hours": [ - 6 - ], - "timezoneOffset": -7 - } - ], - "searchTerms": [ - { - "name": "hasLabel", - "parameters": { - "label": "Status:No recent activity" - } - }, - { - "name": "noActivitySince", - "parameters": { - "days": 14 - } - }, - { - "name": "isIssue", - "parameters": {} - }, - { - "name": "isOpen", - "parameters": {} - } - ], - "taskName": "[Close stale WaitingForCustomer issues] Search for stale WaitingForCustomer issues with no activity over 14 days and warn.", - "actions": [ - { - "name": "closeIssue", - "parameters": {} - }, - { - "name": "removeLabel", - "parameters": { - "label": "Status:No recent activity" - } - }, - { - "name": "addLabel", - "parameters": { - "label": "Resolution:NeedMoreInfo" - } - } - ] - } - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "frequency": [ - { - "weekDay": 0, - "hours": [ - 12 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 1, - "hours": [ - 12 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 2, - "hours": [ - 12 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 3, - "hours": [ - 12 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 4, - "hours": [ - 12 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 5, - "hours": [ - 12 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 6, - "hours": [ - 12 - ], - "timezoneOffset": -7 - } - ], - "searchTerms": [ - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "isIssue", - "parameters": {} - }, - { - "name": "noLabel", - "parameters": { - "label": "Type:Spec" - } - }, - { - "name": "noLabel", - "parameters": { - "label": "Type:Test" - } - }, - { - "name": "noLabel", - "parameters": { - "label": "Type:Feature" - } - }, - { - "name": "noLabel", - "parameters": { - "label": "Type:Docs" - } - }, - { - "name": "noLabel", - "parameters": { - "label": "Type:DCR" - } - }, - { - "name": "noLabel", - "parameters": { - "label": "Type:Bug" - } - }, - { - "name": "noLabel", - "parameters": { - "label": "Type:DeveloperDocs" - } - }, - { - "name": "noLabel", - "parameters": { - "label": "Type:DataAnalysis" - } - }, - { - "name": "noLabel", - "parameters": { - "label": "Type:Learning" - } - }, - { - "name": "noLabel", - "parameters": { - "label": "Type:Tracking" - } - }, - { - "name": "noLabel", - "parameters": { - "label": "Type:Engineering" - } - }, - { - "name": "noLabel", - "parameters": { - "label": "Type:BreakingChange" - } - }, - { - "name": "noLabel", - "parameters": { - "label": "missing-required-type" - } - }, - { - "name": "noLabel", - "parameters": { - "label": "Pipeline:Icebox" - } - }, - { - "name": "noLabel", - "parameters": { - "label": "Epic" - } - } - ], - "taskName": "[Type Label Reminder][4-1] Remind HotSeat to Add Type Label ", - "actions": [ - { - "name": "addReply", - "parameters": { - "comment": "Issue is missing Type label, remember to add a [Type label](https://github.com/NuGet/Client.Engineering/blob/main/designs/nuget-issues-approach.md#issue-type)" - } - }, - { - "name": "addLabel", - "parameters": { - "label": "missing-required-type" - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "labeled" - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "missing-required-type" - } - }, - { - "operator": "or", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "Type:Spec" - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "Type:Test" - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "Type:Feature" - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "Type:Docs" - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "Type:DCR" - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "Type:Bug" - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "Type:DeveloperDocs" - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "Type:DataAnalysis" - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "Type:Learning" - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "Type:Tracking" - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "Type:Engineering" - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "Type:BreakingChange" - } - } - ] - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "missing-required-type" - } - } - ], - "taskName": "[Type Label Reminder][4-2] Remove \"missing-required-type\" if it is has Type label" - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "operator": "not", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "Type:Spec" - } - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "Type:Test" - } - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "Type:Feature" - } - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "Type:Docs" - } - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "Type:DCR" - } - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "Type:Bug" - } - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "Type:DeveloperDocs" - } - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "Type:DataAnalysis" - } - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "Type:Learning" - } - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "Type:Tracking" - } - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "Type:Engineering" - } - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "Type:BreakingChange" - } - } - ] - }, - { - "operator": "and", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "opened" - } - }, - { - "name": "activitySenderHasPermissions", - "parameters": { - "permissions": "write" - } - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "Epic" - } - } - ] - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "[Type Label Reminder][4-3] Remember NuGet Client member(issue author) to add Type label", - "actions": [ - { - "name": "addReply", - "parameters": { - "comment": "@${issueAuthor} Issue is missing Type label, remember to add a [Type label](https://github.com/NuGet/Client.Engineering/blob/main/designs/nuget-issues-approach.md#issue-type)" - } - }, - { - "name": "addLabel", - "parameters": { - "label": "missing-required-type" - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "operator": "and", - "operands": [ - { - "operator": "not", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "Type:Spec" - } - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "Type:Test" - } - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "Type:Feature" - } - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "Type:Docs" - } - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "Type:DCR" - } - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "Type:Bug" - } - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "Type:DeveloperDocs" - } - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "Type:DataAnalysis" - } - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "Type:Learning" - } - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "Type:Tracking" - } - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "Type:Engineering" - } - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "Type:BreakingChange" - } - } - ] - }, - { - "operator": "or", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "reopened" - } - }, - { - "name": "isAction", - "parameters": { - "action": "assigned" - } - }, - { - "name": "isAction", - "parameters": { - "action": "closed" - } - } - ] - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "Epic" - } - } - ] - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "[Type Label Reminder][4-4] Remember NuGet Client member(issue assignee) to add Type label", - "actions": [ - { - "name": "addReply", - "parameters": { - "comment": "${assignees} Issue is missing Type label, remember to add a [Type label](https://github.com/NuGet/Client.Engineering/blob/main/designs/nuget-issues-approach.md#issue-type)" - } - }, - { - "name": "addLabel", - "parameters": { - "label": "missing-required-type" - } - } - ] - } - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "frequency": [ - { - "weekDay": 0, - "hours": [ - 3, - 7, - 11, - 15, - 19, - 23 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 1, - "hours": [ - 3, - 7, - 11, - 15, - 19, - 23 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 2, - "hours": [ - 3, - 7, - 11, - 15, - 19, - 23 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 3, - "hours": [ - 3, - 7, - 11, - 15, - 19, - 23 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 4, - "hours": [ - 3, - 7, - 11, - 15, - 19, - 23 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 5, - "hours": [ - 3, - 7, - 11, - 15, - 19, - 23 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 6, - "hours": [ - 3, - 7, - 11, - 15, - 19, - 23 - ], - "timezoneOffset": -7 - } - ], - "searchTerms": [ - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "isIssue", - "parameters": {} - }, - { - "name": "hasLabel", - "parameters": { - "label": "Status:Inactive" - } - }, - { - "name": "noLabel", - "parameters": { - "label": "Status:Excluded from icebox cleanup" - } - }, - { - "name": "noLabel", - "parameters": { - "label": "Triage:NeedsTriageDiscussion" - } - }, - { - "name": "noLabel", - "parameters": { - "label": "Icebox cleanup candidate" - } - } - ], - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "Icebox cleanup candidate" - } - }, - { - "name": "addReply", - "parameters": { - "comment": "Due to lack of recent activity, this issue has been marked as a candidate for icebox cleanup. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will add a `Triage:NeedsTriageDiscussion` label and lead to a triaging process.\nThis process is part of the experimental [Stale icebox issues cleanup](https://github.com/NuGet/Home/issues/12113) we are currently trialing. Please share any feedback you might have in the linked issue.\n" - } - } - ], - "taskName": "[Close stale icebox][3-1] Search \"Status:Inactive\" but without \"Status:Excluded from icebox cleanup\" and \"Triage:NeedsTriageDiscussion\", add \"Icebox cleanup candidate\" and show a warning." - } - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "frequency": [ - { - "weekDay": 0, - "hours": [ - 2, - 6, - 10, - 14, - 18, - 22 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 1, - "hours": [ - 2, - 6, - 10, - 14, - 18, - 22 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 2, - "hours": [ - 2, - 6, - 10, - 14, - 18, - 22 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 3, - "hours": [ - 2, - 6, - 10, - 14, - 18, - 22 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 4, - "hours": [ - 2, - 6, - 10, - 14, - 18, - 22 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 5, - "hours": [ - 2, - 6, - 10, - 14, - 18, - 22 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 6, - "hours": [ - 2, - 6, - 10, - 14, - 18, - 22 - ], - "timezoneOffset": -7 - } - ], - "searchTerms": [ - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "isIssue", - "parameters": {} - }, - { - "name": "hasLabel", - "parameters": { - "label": "Icebox cleanup candidate" - } - }, - { - "name": "noLabel", - "parameters": { - "label": "Triage:NeedsTriageDiscussion" - } - }, - { - "name": "noActivitySince", - "parameters": { - "days": 14 - } - } - ], - "taskName": "[Close stale icebox][3-2] Close \"Icebox cleanup candidate\" if no activity within 14 days.", - "actions": [ - { - "name": "addReply", - "parameters": { - "comment": "This issue will now be closed since it had been marked Icebox cleanup candidate, but received no further activity in the past 14 days. " - } - }, - { - "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": "Icebox cleanup candidate" - } - }, - { - "operator": "not", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "Triage:NeedsTriageDiscussion" - } - } - ] - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issue_comment" - ], - "taskName": "[Close stale icebox][3-3] For \"Icebox cleanup candidate\" issues, if there is any comments, add \"Triage:NeedsTriageDiscussion\" label", - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "Triage:NeedsTriageDiscussion" - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "operator": "or", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "opened" - } - }, - { - "name": "isAction", - "parameters": { - "action": "reopened" - } - } - ] - }, - { - "name": "activitySenderHasPermissions", - "parameters": { - "permissions": "read" - } - }, - { - "operator": "not", - "operands": [ - { - "name": "isActivitySender", - "parameters": { - "user": "nuget-client " - } - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "Community" - } - } - ] - } - ] - }, - "eventType": "pull_request", - "eventNames": [ - "pull_request", - "issues", - "project_card" - ], - "taskName": "[Label community PRs] [1-1] Label the community PRs", - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "Community" - } - } - ] - } - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "frequency": [ - { - "weekDay": 0, - "hours": [ - 9, - 21 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 1, - "hours": [ - 9, - 21 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 2, - "hours": [ - 9, - 21 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 3, - "hours": [ - 9, - 21 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 4, - "hours": [ - 9, - 21 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 5, - "hours": [ - 9, - 21 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 6, - "hours": [ - 9, - 21 - ], - "timezoneOffset": -7 - } - ], - "searchTerms": [ - { - "name": "hasLabel", - "parameters": { - "label": "Community" - } - }, - { - "name": "noActivitySince", - "parameters": { - "days": 30 - } - }, - { - "name": "isPr", - "parameters": {} - }, - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "noLabel", - "parameters": { - "label": "Status:No recent activity" - } - } - ], - "taskName": "[stale community PR] [5-1] Search for community PRs with no activity over 30 days and warn.", - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "Status:No recent activity" - } - }, - { - "name": "addReply", - "parameters": { - "comment": "This PR has been automatically marked as stale because it has no activity for **30 days**. It will be closed if no further activity occurs **within another 330 days** of this comment. If it is closed, you may reopen it anytime when you're ready again, as long as you don't delete the branch." - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "operator": "not", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "closed" - } - } - ] - }, - { - "name": "hasLabel", - "parameters": { - "label": "Status:No recent activity" - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "Community" - } - } - ] - }, - "eventType": "pull_request", - "eventNames": [ - "pull_request", - "issues", - "project_card" - ], - "taskName": "[stale community PR] [5-2] Remove \"Status:No recent activity\" if there is any activity.", - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "Status:No recent activity" - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestCommentResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "Status:No recent activity" - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "Community" - } - } - ] - }, - "eventType": "pull_request", - "eventNames": [ - "issue_comment" - ], - "taskName": "[stale community PR] [5-3] Remove \"Status:No recent activity\" if there is any comment.", - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "Status:No recent activity" - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestReviewResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "Status:No recent activity" - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "Community" - } - } - ] - }, - "eventType": "pull_request", - "eventNames": [ - "pull_request_review" - ], - "taskName": "[stale community PR] [5-4] Remove \"Status:No recent activity\" if there are any reviews.", - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "Status:No recent activity" - } - } - ] - } - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "frequency": [ - { - "weekDay": 0, - "hours": [ - 7, - 19 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 1, - "hours": [ - 7, - 19 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 2, - "hours": [ - 7, - 19 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 3, - "hours": [ - 7, - 19 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 4, - "hours": [ - 7, - 19 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 5, - "hours": [ - 7, - 19 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 6, - "hours": [ - 7, - 19 - ], - "timezoneOffset": -7 - } - ], - "searchTerms": [ - { - "name": "isPr", - "parameters": {} - }, - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "hasLabel", - "parameters": { - "label": "Status:No recent activity" - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "Community" - } - }, - { - "name": "noActivitySince", - "parameters": { - "days": 330 - } - }, - { - "name": "noLabel", - "parameters": { - "label": "Status:Do not auto close" - } - } - ], - "taskName": "[stale community PR] [5-5] Close PRs with no activity over 330 days after warn.", - "actions": [ - { - "name": "closeIssue", - "parameters": {} - } - ] - } - } - ], - "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..1056b5ab9 --- /dev/null +++ b/.github/policies/resourceManagement.yml @@ -0,0 +1,520 @@ +id: +name: GitOps.PullRequestIssueManagement +description: GitOps.PullRequestIssueManagement primitive +owner: +resource: repository +disabled: false +where: +configuration: + resourceManagementConfiguration: + scheduledSearches: + - description: '[stale PR] [5-1] Search for PRs with no activity over 30 days and warn. (except draft PRs and Community PRs)' + frequencies: + - hourly: + hour: 3 + filters: + - hasLabel: + label: Community + - noActivitySince: + days: 30 + - isPullRequest + - isOpen + - isNotDraftPullRequest + - isNotLabeledWith: + label: Status:No recent activity + - isNotLabeledWith: + label: Community + actions: + - addLabel: + label: Status:No recent activity + - addReply: + reply: This PR has been automatically marked as stale because it has no activity for **30 days**. It will be closed if no further activity occurs **within another 15 days** of this comment, unless it has a "Status:Do not auto close" label. If it is closed, you may reopen it anytime when you're ready again, as long as you don't delete the branch. + - description: '[stale PR] [5-5] Close PRs with no activity over 15 days after warn (except Community PRs)' + frequencies: + - hourly: + hour: 3 + filters: + - isPullRequest + - isOpen + - hasLabel: + label: Status:No recent activity + - isNotLabeledWith: + label: Community + - noActivitySince: + days: 15 + - isNotLabeledWith: + label: Status:Do not auto close + actions: + - closeIssue + - description: '[Manage stale WaitingForCustomer issues] Search for WaitingForCustomer issues with no activity over 14 days and warn.' + frequencies: + - daily: + time: 6:0 + filters: + - hasLabel: + label: WaitingForCustomer + - noActivitySince: + days: 14 + - isIssue + - isOpen + - isNotLabeledWith: + label: Status:No recent activity + actions: + - addLabel: + label: Status:No recent activity + - addReply: + reply: This issue has been automatically marked as stale because we have not received a response in 14 days. It will be closed if no further activity occurs within another 14 days of this comment. + - description: '[Close stale WaitingForCustomer issues] Search for stale WaitingForCustomer issues with no activity over 14 days and warn.' + frequencies: + - daily: + time: 6:0 + filters: + - hasLabel: + label: Status:No recent activity + - noActivitySince: + days: 14 + - isIssue + - isOpen + actions: + - closeIssue + - removeLabel: + label: Status:No recent activity + - addLabel: + label: Resolution:NeedMoreInfo + - description: '[Type Label Reminder][4-1] Remind HotSeat to Add Type Label ' + frequencies: + - daily: + time: 12:0 + filters: + - isOpen + - isIssue + - isNotLabeledWith: + label: Type:Spec + - isNotLabeledWith: + label: Type:Test + - isNotLabeledWith: + label: Type:Feature + - isNotLabeledWith: + label: Type:Docs + - isNotLabeledWith: + label: Type:DCR + - isNotLabeledWith: + label: Type:Bug + - isNotLabeledWith: + label: Type:DeveloperDocs + - isNotLabeledWith: + label: Type:DataAnalysis + - isNotLabeledWith: + label: Type:Learning + - isNotLabeledWith: + label: Type:Tracking + - isNotLabeledWith: + label: Type:Engineering + - isNotLabeledWith: + label: Type:BreakingChange + - isNotLabeledWith: + label: missing-required-type + - isNotLabeledWith: + label: Pipeline:Icebox + - isNotLabeledWith: + label: Epic + actions: + - addReply: + reply: Issue is missing Type label, remember to add a [Type label](https://github.com/NuGet/Client.Engineering/blob/main/designs/nuget-issues-approach.md#issue-type) + - addLabel: + label: missing-required-type + - description: '[Close stale icebox][3-1] Search "Status:Inactive" but without "Status:Excluded from icebox cleanup" and "Triage:NeedsTriageDiscussion", add "Icebox cleanup candidate" and show a warning.' + frequencies: + - hourly: + hour: 4 + filters: + - isOpen + - isIssue + - hasLabel: + label: Status:Inactive + - isNotLabeledWith: + label: Status:Excluded from icebox cleanup + - isNotLabeledWith: + label: Triage:NeedsTriageDiscussion + - isNotLabeledWith: + label: Icebox cleanup candidate + actions: + - addLabel: + label: Icebox cleanup candidate + - addReply: + reply: > + Due to lack of recent activity, this issue has been marked as a candidate for icebox cleanup. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will add a `Triage:NeedsTriageDiscussion` label and lead to a triaging process. + + This process is part of the experimental [Stale icebox issues cleanup](https://github.com/NuGet/Home/issues/12113) we are currently trialing. Please share any feedback you might have in the linked issue. + - description: '[Close stale icebox][3-2] Close "Icebox cleanup candidate" if no activity within 14 days.' + frequencies: + - hourly: + hour: 4 + filters: + - isOpen + - isIssue + - hasLabel: + label: Icebox cleanup candidate + - isNotLabeledWith: + label: Triage:NeedsTriageDiscussion + - noActivitySince: + days: 14 + actions: + - addReply: + reply: 'This issue will now be closed since it had been marked Icebox cleanup candidate, but received no further activity in the past 14 days. ' + - closeIssue + - description: '[stale community PR] [5-1] Search for community PRs with no activity over 30 days and warn.' + frequencies: + - hourly: + hour: 12 + filters: + - hasLabel: + label: Community + - noActivitySince: + days: 30 + - isPullRequest + - isOpen + - isNotLabeledWith: + label: Status:No recent activity + actions: + - addLabel: + label: Status:No recent activity + - addReply: + reply: This PR has been automatically marked as stale because it has no activity for **30 days**. It will be closed if no further activity occurs **within another 330 days** of this comment. If it is closed, you may reopen it anytime when you're ready again, as long as you don't delete the branch. + - description: '[stale community PR] [5-5] Close PRs with no activity over 330 days after warn.' + frequencies: + - hourly: + hour: 12 + filters: + - isPullRequest + - isOpen + - hasLabel: + label: Status:No recent activity + - hasLabel: + label: Community + - noActivitySince: + days: 330 + - isNotLabeledWith: + label: Status:Do not auto close + actions: + - closeIssue + eventResponderTasks: + - if: + - payloadType: Issues + - isAction: + action: Opened + - or: + - isActivitySender: + user: vsfeedback + issueAuthor: False + - bodyContains: + pattern: Copied from original issue + isRegex: False + - bodyContains: + pattern: Issue moved from + isRegex: False + then: + - addLabel: + label: Transferred issue + - addLabel: + label: Triage:Untriaged + description: "[Manage \"WaitingFor\" labels] [4-1] Tag \"Transferred issue\" if it's transferred from vsfeedback or other github repo." + - if: + - payloadType: Issue_Comment + - isAction: + action: Created + - hasLabel: + label: WaitingForCustomer + - isOpen + - or: + - and: + - hasLabel: + label: Transferred issue + - not: + activitySenderHasPermission: + permission: Write + - isActivitySender: + issueAuthor: True + then: + - removeLabel: + label: WaitingForCustomer + - addLabel: + label: WaitingForClientTeam + - removeLabel: + label: Status:No recent activity + description: "[Manage \"WaitingFor\" labels] [4-2] Replace tag \"WaitingForCustomer\" with \"WaitingForClientTeam\" when the author comments on an issue. Also remove `Status:No recent activity` if it's been set." + - if: + - payloadType: Issues + - isAction: + action: Closed + - or: + - hasLabel: + label: WaitingForClientTeam + - hasLabel: + label: WaitingForCustomer + then: + - removeLabel: + label: WaitingForClientTeam + - removeLabel: + label: WaitingForCustomer + description: '[Manage "WaitingFor" labels] [4-3] Remove any "WaitingFor" label when the issue is closed' + - if: + - payloadType: Issue_Comment + - isAction: + action: Created + - hasLabel: + label: WaitingForClientTeam + - isOpen + - or: + - activitySenderHasPermission: + permission: Write + - activitySenderHasPermission: + permission: Admin + then: + - removeLabel: + label: WaitingForClientTeam + - addLabel: + label: WaitingForCustomer + description: '[Manage "WaitingFor" labels] [4-4] Replace tag "WaitingForClientTeam" with "WaitingForCustomer" when client team comments on an issue.' + - if: + - payloadType: Pull_Request + - not: + isAction: + action: Closed + - hasLabel: + label: Status:No recent activity + then: + - removeLabel: + label: Status:No recent activity + description: '[stale PR] [5-2] Remove "Status:No recent activity" if there is any activity.' + - if: + - payloadType: Issue_Comment + - isPullRequest + - hasLabel: + label: Status:No recent activity + then: + - removeLabel: + label: Status:No recent activity + description: '[stale PR] [5-3] Remove "Status:No recent activity" if there is any comment.' + - if: + - payloadType: Pull_Request_Review + - hasLabel: + label: Status:No recent activity + - hasLabel: + label: Community + then: + - removeLabel: + label: Status:No recent activity + description: '[stale PR] [5-4] Remove "Status:No recent activity" if there are any reviews.' + - if: + - payloadType: Issues + - isAction: + action: Labeled + - hasLabel: + label: missing-required-type + - or: + - hasLabel: + label: Type:Spec + - hasLabel: + label: Type:Test + - hasLabel: + label: Type:Feature + - hasLabel: + label: Type:Docs + - hasLabel: + label: Type:DCR + - hasLabel: + label: Type:Bug + - hasLabel: + label: Type:DeveloperDocs + - hasLabel: + label: Type:DataAnalysis + - hasLabel: + label: Type:Learning + - hasLabel: + label: Type:Tracking + - hasLabel: + label: Type:Engineering + - hasLabel: + label: Type:BreakingChange + then: + - removeLabel: + label: missing-required-type + description: '[Type Label Reminder][4-2] Remove "missing-required-type" if it is has Type label' + - if: + - payloadType: Issues + - not: + hasLabel: + label: Type:Spec + - not: + hasLabel: + label: Type:Test + - not: + hasLabel: + label: Type:Feature + - not: + hasLabel: + label: Type:Docs + - not: + hasLabel: + label: Type:DCR + - not: + hasLabel: + label: Type:Bug + - not: + hasLabel: + label: Type:DeveloperDocs + - not: + hasLabel: + label: Type:DataAnalysis + - not: + hasLabel: + label: Type:Learning + - not: + hasLabel: + label: Type:Tracking + - not: + hasLabel: + label: Type:Engineering + - not: + hasLabel: + label: Type:BreakingChange + - and: + - isAction: + action: Opened + - activitySenderHasPermission: + permission: Write + - not: + hasLabel: + label: Epic + then: + - addReply: + reply: '@${issueAuthor} Issue is missing Type label, remember to add a [Type label](https://github.com/NuGet/Client.Engineering/blob/main/designs/nuget-issues-approach.md#issue-type)' + - addLabel: + label: missing-required-type + description: '[Type Label Reminder][4-3] Remember NuGet Client member(issue author) to add Type label' + - if: + - payloadType: Issues + - and: + - not: + hasLabel: + label: Type:Spec + - not: + hasLabel: + label: Type:Test + - not: + hasLabel: + label: Type:Feature + - not: + hasLabel: + label: Type:Docs + - not: + hasLabel: + label: Type:DCR + - not: + hasLabel: + label: Type:Bug + - not: + hasLabel: + label: Type:DeveloperDocs + - not: + hasLabel: + label: Type:DataAnalysis + - not: + hasLabel: + label: Type:Learning + - not: + hasLabel: + label: Type:Tracking + - not: + hasLabel: + label: Type:Engineering + - not: + hasLabel: + label: Type:BreakingChange + - or: + - isAction: + action: Reopened + - isAction: + action: Assigned + - isAction: + action: Closed + - not: + hasLabel: + label: Epic + then: + - addReply: + reply: ${assignees} Issue is missing Type label, remember to add a [Type label](https://github.com/NuGet/Client.Engineering/blob/main/designs/nuget-issues-approach.md#issue-type) + - addLabel: + label: missing-required-type + description: '[Type Label Reminder][4-4] Remember NuGet Client member(issue assignee) to add Type label' + - if: + - payloadType: Issue_Comment + - isOpen + - isAction: + action: Created + - hasLabel: + label: Icebox cleanup candidate + - not: + hasLabel: + label: Triage:NeedsTriageDiscussion + then: + - addLabel: + label: Triage:NeedsTriageDiscussion + description: '[Close stale icebox][3-3] For "Icebox cleanup candidate" issues, if there is any comments, add "Triage:NeedsTriageDiscussion" label' + - if: + - payloadType: Pull_Request + - or: + - isAction: + action: Opened + - isAction: + action: Reopened + - activitySenderHasPermission: + permission: Read + - not: + isActivitySender: + user: 'nuget-client ' + issueAuthor: False + - not: + hasLabel: + label: Community + then: + - addLabel: + label: Community + description: '[Label community PRs] [1-1] Label the community PRs' + - if: + - payloadType: Pull_Request + - not: + isAction: + action: Closed + - hasLabel: + label: Status:No recent activity + - hasLabel: + label: Community + then: + - removeLabel: + label: Status:No recent activity + description: '[stale community PR] [5-2] Remove "Status:No recent activity" if there is any activity.' + - if: + - payloadType: Issue_Comment + - isPullRequest + - hasLabel: + label: Status:No recent activity + - hasLabel: + label: Community + then: + - removeLabel: + label: Status:No recent activity + description: '[stale community PR] [5-3] Remove "Status:No recent activity" if there is any comment.' + - if: + - payloadType: Pull_Request_Review + - hasLabel: + label: Status:No recent activity + - hasLabel: + label: Community + then: + - removeLabel: + label: Status:No recent activity + description: '[stale community PR] [5-4] Remove "Status:No recent activity" if there are any reviews.' +onFailure: +onSuccess: