From 9013fd208c10a86aa4cbb4910338157c8293a7ff Mon Sep 17 00:00:00 2001 From: "microsoft-github-policy-service[bot]" <77245923+microsoft-github-policy-service[bot]@users.noreply.github.com> Date: Fri, 7 Jul 2023 17:33:00 +0000 Subject: [PATCH] chore: migrete to GitOps.ResourceManagement because of FabricBot decommissioning (#2590) Add prIssueManagement.yml to onboard repo to GitOps.ResourceManagement as FabricBot replacement Deleting fabricbot.json --------- Co-authored-by: microsoft-github-policy-service[bot] <77245923+microsoft-github-policy-service[bot]@users.noreply.github.com> --- .github/fabricbot.json | 2491 ----------------------- .github/policies/resourceManagement.yml | 266 +++ 2 files changed, 266 insertions(+), 2491 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 dd4a25c756..0000000000 --- a/.github/fabricbot.json +++ /dev/null @@ -1,2491 +0,0 @@ -{ - "version": "1.0", - "tasks": [ - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssueCommentResponder", - "version": "1.0", - "config": { - "taskName": "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" - } - }, - { - "name": "isActivitySender", - "parameters": { - "user": { - "type": "author" - } - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "Needs: Author Feedback" - } - } - ] - }, - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "Needs: Attention :wave:" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "Needs: Author Feedback" - } - } - ], - "eventType": "issue", - "eventNames": [ - "issue_comment" - ] - }, - "id": "CIypIJG15L" - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "config": { - "taskName": "Remove no recent activity label from issues", - "conditions": { - "operator": "and", - "operands": [ - { - "operator": "not", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "closed" - } - } - ] - }, - { - "name": "hasLabel", - "parameters": { - "label": "no-recent-activity" - } - } - ] - }, - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "no-recent-activity" - } - } - ], - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ] - }, - "id": "tfFb5MZkEN" - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "taskName": "Close stale issues", - "frequency": [ - { - "weekDay": 0, - "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": 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 - ] - }, - { - "weekDay": 6, - "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": "Needs: Author Feedback" - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "no-recent-activity" - } - }, - { - "name": "noActivitySince", - "parameters": { - "days": 3 - } - } - ], - "actions": [ - { - "name": "closeIssue", - "parameters": {} - } - ] - }, - "id": "eiuNSJBgWu" - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "taskName": "Add no recent activity label to issues", - "frequency": [ - { - "weekDay": 0, - "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": 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 - ] - }, - { - "weekDay": 6, - "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": "Needs: Author Feedback" - } - }, - { - "name": "noActivitySince", - "parameters": { - "days": 4 - } - }, - { - "name": "noLabel", - "parameters": { - "label": "no-recent-activity" - } - } - ], - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "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**." - } - } - ] - }, - "id": "Ip_vXNKxak" - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "taskName": "Close duplicate issues", - "frequency": [ - { - "weekDay": 0, - "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": 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 - ] - }, - { - "weekDay": 6, - "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": "duplicate" - } - }, - { - "name": "noActivitySince", - "parameters": { - "days": 1 - } - } - ], - "actions": [ - { - "name": "addReply", - "parameters": { - "comment": "This issue has been marked as duplicate and has not had any activity for **1 day**. It will be closed for housekeeping purposes." - } - }, - { - "name": "closeIssue", - "parameters": {} - } - ] - }, - "id": "-zx2TOSryO" - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssueCommentResponder", - "version": "1.0", - "config": { - "eventType": "issue", - "eventNames": [ - "issue_comment" - ], - "conditions": { - "operator": "and", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "no-recent-activity" - } - } - ] - }, - "taskName": "Remove no recent activity label when an issue is commented on", - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "no-recent-activity" - } - } - ] - }, - "id": "jagMoVNuz" - }, - { - "taskType": "trigger", - "capabilityId": "InPrLabel", - "subCapability": "InPrLabel", - "version": "1.0", - "id": "llWcC3LFk", - "config": { - "taskName": "Add In-PR label when PR is created", - "label_inPr": "State: In Review", - "fixedLabelEnabled": true, - "label_fixed": "State: Completed" - } - }, - { - "taskType": "trigger", - "capabilityId": "EmailCleanser", - "subCapability": "EmailCleanser", - "version": "1.0", - "id": "An4EMupLV", - "config": { - "taskName": "Email cleanser" - } - }, - { - "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": "no-recent-activity" - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "Needs: Author Feedback" - } - }, - { - "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": "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": "no-recent-activity" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "Needs: Author Feedback" - } - }, - { - "name": "addLabel", - "parameters": { - "label": "Needs: Attention :wave:" - } - } - ] - }, - "id": "IRTbTrSfM" - }, - { - "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": "none" - } - }, - { - "name": "noActivitySince", - "parameters": { - "days": 7 - } - }, - { - "operator": "not", - "operands": [ - { - "name": "isCloseAndComment", - "parameters": {} - } - ] - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issue_comment" - ], - "taskName": "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!" - } - } - ] - }, - "id": "yF5wT4TJm9" - }, - { - "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": "isClosed", - "parameters": {} - }, - { - "name": "noActivitySince", - "parameters": { - "days": 30 - } - }, - { - "name": "isUnlocked", - "parameters": {} - }, - { - "name": "isIssue", - "parameters": {} - } - ], - "taskName": "Lock issues closed without activity for over 30 days", - "actions": [ - { - "name": "lockIssue", - "parameters": { - "reason": "resolved" - } - } - ] - }, - "id": "SOEjDgJPlH" - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestReviewResponder", - "version": "1.0", - "config": { - "taskName": "Add needs author feedback label to pull requests when changes are requested", - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "submitted" - } - }, - { - "name": "isReviewState", - "parameters": { - "state": "changes_requested" - } - } - ] - }, - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "Needs: Author Feedback" - } - } - ], - "eventType": "pull_request", - "eventNames": [ - "pull_request_review" - ] - }, - "id": "UoZhI9Xa_b" - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestResponder", - "version": "1.0", - "config": { - "taskName": "Remove needs author feedback label when the author responds to a pull request", - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isActivitySender", - "parameters": { - "user": { - "type": "author" - } - } - }, - { - "operator": "not", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "closed" - } - } - ] - }, - { - "name": "hasLabel", - "parameters": { - "label": "Needs: Author Feedback" - } - } - ] - }, - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "Needs: Author Feedback" - } - } - ], - "eventType": "pull_request", - "eventNames": [ - "pull_request", - "issues", - "project_card" - ] - }, - "id": "OBnWQyDvQP" - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestCommentResponder", - "version": "1.0", - "config": { - "taskName": "Remove needs author feedback label when the author comments on a pull request", - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isActivitySender", - "parameters": { - "user": { - "type": "author" - } - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "Needs: Author Feedback" - } - } - ] - }, - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "Needs: Author Feedback" - } - } - ], - "eventType": "pull_request", - "eventNames": [ - "issue_comment" - ] - }, - "id": "-vTgwlrBFi" - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestReviewResponder", - "version": "1.0", - "config": { - "taskName": "Remove needs author feedback label when the author responds to a pull request review comment", - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isActivitySender", - "parameters": { - "user": { - "type": "author" - } - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "Needs: Author Feedback" - } - } - ] - }, - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "Needs: Author Feedback" - } - } - ], - "eventType": "pull_request", - "eventNames": [ - "pull_request_review" - ] - }, - "id": "n0PmRx-B7j" - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestResponder", - "version": "1.0", - "config": { - "taskName": "Remove no recent activity label from pull requests", - "conditions": { - "operator": "and", - "operands": [ - { - "operator": "not", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "closed" - } - } - ] - }, - { - "name": "hasLabel", - "parameters": { - "label": "no-recent-activity" - } - } - ] - }, - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "no-recent-activity" - } - } - ], - "eventType": "pull_request", - "eventNames": [ - "pull_request", - "issues", - "project_card" - ] - }, - "id": "wnHBiGRhLL" - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestCommentResponder", - "version": "1.0", - "config": { - "taskName": "Remove no recent activity label when a pull request is commented on", - "conditions": { - "operator": "and", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "no-recent-activity" - } - } - ] - }, - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "no-recent-activity" - } - } - ], - "eventType": "pull_request", - "eventNames": [ - "issue_comment" - ] - }, - "id": "zQ4HFBl0o8" - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestReviewResponder", - "version": "1.0", - "config": { - "taskName": "Remove no recent activity label when a pull request is reviewed", - "conditions": { - "operator": "and", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "no-recent-activity" - } - } - ] - }, - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "no-recent-activity" - } - } - ], - "eventType": "pull_request", - "eventNames": [ - "pull_request_review" - ] - }, - "id": "8Zyb0OGTkn" - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "taskName": "Close stale pull requests", - "frequency": [ - { - "weekDay": 0, - "hours": [ - 4, - 10, - 16, - 22 - ] - }, - { - "weekDay": 1, - "hours": [ - 4, - 10, - 16, - 22 - ] - }, - { - "weekDay": 2, - "hours": [ - 4, - 10, - 16, - 22 - ] - }, - { - "weekDay": 3, - "hours": [ - 4, - 10, - 16, - 22 - ] - }, - { - "weekDay": 4, - "hours": [ - 4, - 10, - 16, - 22 - ] - }, - { - "weekDay": 5, - "hours": [ - 4, - 10, - 16, - 22 - ] - }, - { - "weekDay": 6, - "hours": [ - 4, - 10, - 16, - 22 - ] - } - ], - "searchTerms": [ - { - "name": "isPr", - "parameters": {} - }, - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "hasLabel", - "parameters": { - "label": "Needs: Author Feedback" - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "no-recent-activity" - } - }, - { - "name": "noActivitySince", - "parameters": { - "days": 7 - } - } - ], - "actions": [ - { - "name": "closeIssue", - "parameters": {} - } - ] - }, - "id": "bWkxtxkwbN" - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "taskName": "Add no recent activity label to pull requests", - "frequency": [ - { - "weekDay": 0, - "hours": [ - 5, - 11, - 17, - 23 - ] - }, - { - "weekDay": 1, - "hours": [ - 5, - 11, - 17, - 23 - ] - }, - { - "weekDay": 2, - "hours": [ - 5, - 11, - 17, - 23 - ] - }, - { - "weekDay": 3, - "hours": [ - 5, - 11, - 17, - 23 - ] - }, - { - "weekDay": 4, - "hours": [ - 5, - 11, - 17, - 23 - ] - }, - { - "weekDay": 5, - "hours": [ - 5, - 11, - 17, - 23 - ] - }, - { - "weekDay": 6, - "hours": [ - 5, - 11, - 17, - 23 - ] - } - ], - "searchTerms": [ - { - "name": "isPr", - "parameters": {} - }, - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "hasLabel", - "parameters": { - "label": "Needs: Author Feedback" - } - }, - { - "name": "noActivitySince", - "parameters": { - "days": 7 - } - }, - { - "name": "noLabel", - "parameters": { - "label": "no-recent-activity" - } - } - ], - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "no-recent-activity" - } - }, - { - "name": "addReply", - "parameters": { - "comment": "This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **7 days**. It will be closed if no further activity occurs **within 7 days of this comment**." - } - } - ] - }, - "id": "NU4lWfVyPH" - }, - { - "taskType": "trigger", - "capabilityId": "AutoMerge", - "subCapability": "AutoMerge", - "version": "1.0", - "config": { - "taskName": "Automatically merge pull requests", - "label": "Auto Merge", - "silentMode": false, - "minMinutesOpen": 480, - "mergeType": "squash", - "allowAutoMergeInstructionsWithoutLabel": true, - "deleteBranches": true, - "removeLabelOnPush": true - }, - "id": "hLdY5T4NXX" - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "id": "XKioHvoYL", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "addedToProjectColumn", - "parameters": { - "projectName": "Bugs", - "columnName": "In progress" - } - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Add \"work-in Progress\" label when moved to In progress column in the project", - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "Needs: Triage :mag:" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "State: Completed" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "State: Blocked" - } - }, - { - "name": "addLabel", - "parameters": { - "label": "work-in-progress" - } - } - ] - }, - "disabled": false - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "id": "aKMJYzAt3", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "addedToProjectColumn", - "parameters": { - "projectName": "Bugs", - "columnName": "Blocked" - } - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Add Blocked label when moved to blocked column in the project", - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "Needs: Triage :mag:" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "work-in-progress" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "State: Completed" - } - }, - { - "name": "addLabel", - "parameters": { - "label": "State: Blocked" - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "id": "EC_eKTm6n", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "opened" - } - }, - { - "operator": "not", - "operands": [ - { - "name": "isPartOfProject", - "parameters": {} - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "isAssignedToSomeone", - "parameters": {} - } - ] - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Add needs triage label with welcome message", - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "Needs: Triage :mag:" - } - }, - { - "name": "addReply", - "parameters": { - "comment": "Hello ${issueAuthor}, thank you for opening an issue with us! \n\nI have automatically added a \"needs triage\" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌" - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "id": "4rdSarog3", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "addedToProjectColumn", - "parameters": { - "projectName": "Bugs", - "columnName": "Done" - } - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Add Completed label when moved to Done column in the project", - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "work-in-progress" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "State: Blocked" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "Needs: Triage :mag:" - } - }, - { - "name": "addLabel", - "parameters": { - "label": "State: Completed" - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "id": "1NzGEY0Ts", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "addedToProjectColumn", - "parameters": { - "projectName": "Bugs", - "columnName": "Need Triage" - } - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Add Needs Triage label when moved to Need Triage column in the project", - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "work-in-progress" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "State: Blocked" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "State: Completed" - } - }, - { - "name": "addLabel", - "parameters": { - "label": "Needs: Triage :mag:" - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "id": "Jc0XDwav7", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "addedToProjectColumn", - "parameters": { - "projectName": "Bugs", - "columnName": "To do" - } - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Add In Review label when moved to To do column in the project", - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "Needs: Triage :mag:" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "work-in-progress" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "State: Blocked" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "State: Completed" - } - }, - { - "name": "addLabel", - "parameters": { - "label": "State: In Review" - } - } - ] - }, - "disabled": true - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "id": "0aFXS94BF", - "config": { - "conditions": { - "operator": "and", - "operands": [] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Add Completed label when moved to Completed column in the project" - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "id": "1D75705wk", - "config": { - "conditions": { - "operator": "and", - "operands": [] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Add Completed label when moved to Completed column in the project" - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "id": "TzbnPh5Ns", - "config": { - "conditions": { - "operator": "and", - "operands": [] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "id": "VuBrytO5f", - "config": { - "conditions": { - "operator": "and", - "operands": [] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Add Completed label when moved to Completed column in the project" - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "id": "NdorH5DKo", - "config": { - "conditions": { - "operator": "and", - "operands": [] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Add Completed label when moved to Completed column in the project" - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "id": "ynjXgMrwM", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "opened" - } - }, - { - "operator": "not", - "operands": [ - { - "name": "isPartOfProject", - "parameters": {} - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "isAssignedToSomeone", - "parameters": {} - } - ] - }, - { - "name": "isActivitySender", - "parameters": { - "user": "beth-panx" - } - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Add needs triage label to new issues", - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "Needs: Triage :mag:" - } - } - ] - }, - "disabled": true - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "id": "uXuAa-NuO", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "opened" - } - }, - { - "operator": "not", - "operands": [ - { - "name": "isPartOfProject", - "parameters": {} - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "isAssignedToSomeone", - "parameters": {} - } - ] - }, - { - "name": "isActivitySender", - "parameters": { - "user": "nmetulev" - } - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Add needs triage label to new issues", - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "Needs: Triage :mag:" - } - } - ] - }, - "disabled": true - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "id": "Tp7y8GKhw", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "opened" - } - }, - { - "operator": "not", - "operands": [ - { - "name": "isPartOfProject", - "parameters": {} - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "isAssignedToSomeone", - "parameters": {} - } - ] - }, - { - "name": "isActivitySender", - "parameters": { - "user": "elisenyang" - } - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Add needs triage label to new issues", - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "Needs: Triage :mag:" - } - } - ] - }, - "disabled": true - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "id": "PW31TsJS3", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "opened" - } - }, - { - "operator": "not", - "operands": [ - { - "name": "isPartOfProject", - "parameters": {} - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "isAssignedToSomeone", - "parameters": {} - } - ] - }, - { - "name": "isActivitySender", - "parameters": { - "user": "tramadon" - } - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Add needs triage label to new issues", - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "Needs: Triage :mag:" - } - } - ] - }, - "disabled": true - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "id": "gi-wugm-f", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "opened" - } - }, - { - "operator": "not", - "operands": [ - { - "name": "isPartOfProject", - "parameters": {} - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "isAssignedToSomeone", - "parameters": {} - } - ] - }, - { - "name": "isActivitySender", - "parameters": { - "user": "vogtn" - } - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Add needs triage label to new issues", - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "Needs: Triage :mag:" - } - } - ] - }, - "disabled": true - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestResponder", - "version": "1.0", - "id": "-6FfHwtvg", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "opened" - } - } - ] - }, - "eventType": "pull_request", - "eventNames": [ - "pull_request", - "issues", - "project_card" - ], - "actions": [ - { - "name": "addReply", - "parameters": { - "comment": "Thank you for creating a Pull Request @${issueAuthor}.\n\nThis is a checklist for the PR reviewer(s) to complete before approving and merging this PR:\n\n- [ ] I have verified a documentation PR has been linked and is approved (or not applicable) \n- [ ] I have ran this PR locally and have tested the fix/feature\n- [ ] I have verified that stories have been added to storybook (or not applicable) \n- [ ] I have tested existing stories in storybook to verify no regression has occured\n- [ ] I have tested the solution in at least two browsers (Edge + 1 non-Chromium based browser)" - } - } - ], - "taskName": "Add PR reviewer checklist on open PRs" - }, - "disabled": false - } - ], - "userGroups": [] -} diff --git a/.github/policies/resourceManagement.yml b/.github/policies/resourceManagement.yml new file mode 100644 index 0000000000..9b35fb73be --- /dev/null +++ b/.github/policies/resourceManagement.yml @@ -0,0 +1,266 @@ +id: +name: GitOps.PullRequestIssueManagement +description: GitOps.PullRequestIssueManagement primitive +owner: +resource: repository +disabled: false +where: +configuration: + resourceManagementConfiguration: + scheduledSearches: + - description: + frequencies: + - hourly: + hour: 1 + filters: + - isIssue + - isOpen + - hasLabel: + label: 'Needs: Author Feedback' + - hasLabel: + label: no-recent-activity + - noActivitySince: + days: 3 + actions: + - closeIssue + - description: + frequencies: + - hourly: + hour: 1 + filters: + - isIssue + - isOpen + - hasLabel: + label: 'Needs: Author Feedback' + - noActivitySince: + days: 4 + - isNotLabeledWith: + label: no-recent-activity + actions: + - addLabel: + label: no-recent-activity + - addReply: + reply: This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**. + - description: + frequencies: + - hourly: + hour: 1 + filters: + - isIssue + - isOpen + - hasLabel: + label: duplicate + - noActivitySince: + days: 1 + actions: + - addReply: + reply: This issue has been marked as duplicate and has not had any activity for **1 day**. It will be closed for housekeeping purposes. + - closeIssue + - description: + frequencies: + - hourly: + hour: 6 + filters: + - isPullRequest + - isOpen + - hasLabel: + label: 'Needs: Author Feedback' + - hasLabel: + label: no-recent-activity + - noActivitySince: + days: 7 + actions: + - closeIssue + - description: + frequencies: + - hourly: + hour: 6 + filters: + - isPullRequest + - isOpen + - hasLabel: + label: 'Needs: Author Feedback' + - noActivitySince: + days: 7 + - isNotLabeledWith: + label: no-recent-activity + actions: + - addLabel: + label: no-recent-activity + - addReply: + reply: This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **7 days**. It will be closed if no further activity occurs **within 7 days of this comment**. + eventResponderTasks: + - if: + - payloadType: Issue_Comment + - isAction: + action: Created + - isActivitySender: + issueAuthor: True + - hasLabel: + label: 'Needs: Author Feedback' + then: + - addLabel: + label: 'Needs: Attention :wave:' + - removeLabel: + label: 'Needs: Author Feedback' + description: + - if: + - payloadType: Issues + - not: + isAction: + action: Closed + - hasLabel: + label: no-recent-activity + then: + - removeLabel: + label: no-recent-activity + description: + - if: + - payloadType: Issue_Comment + - hasLabel: + label: no-recent-activity + then: + - removeLabel: + label: no-recent-activity + description: + - if: + - payloadType: Pull_Request + then: + - inPrLabel: + label: 'State: In Review' + description: + - if: + - payloadType: Issue_Comment + then: + - cleanEmailReply + description: + - if: + - payloadType: Pull_Request_Review + - isAction: + action: Submitted + - isReviewState: + reviewState: Changes_requested + then: + - addLabel: + label: 'Needs: Author Feedback' + description: + - if: + - payloadType: Pull_Request + - isActivitySender: + issueAuthor: True + - not: + isAction: + action: Closed + - hasLabel: + label: 'Needs: Author Feedback' + then: + - removeLabel: + label: 'Needs: Author Feedback' + description: + - if: + - payloadType: Issue_Comment + - isActivitySender: + issueAuthor: True + - hasLabel: + label: 'Needs: Author Feedback' + then: + - removeLabel: + label: 'Needs: Author Feedback' + description: + - if: + - payloadType: Pull_Request_Review + - isActivitySender: + issueAuthor: True + - hasLabel: + label: 'Needs: Author Feedback' + then: + - removeLabel: + label: 'Needs: Author Feedback' + description: + - if: + - payloadType: Pull_Request + - not: + isAction: + action: Closed + - hasLabel: + label: no-recent-activity + then: + - removeLabel: + label: no-recent-activity + description: + - if: + - payloadType: Issue_Comment + - hasLabel: + label: no-recent-activity + then: + - removeLabel: + label: no-recent-activity + description: + - if: + - payloadType: Pull_Request_Review + - hasLabel: + label: no-recent-activity + then: + - removeLabel: + label: no-recent-activity + description: + - if: + - payloadType: Pull_Request + - hasLabel: + label: Auto Merge + then: + - enableAutoMerge: + mergeMethod: Squash + description: + - if: + - payloadType: Pull_Request + - labelRemoved: + label: Auto Merge + then: + - disableAutoMerge + description: + - if: + - payloadType: Issues + then: [] + description: + - if: + - payloadType: Issues + then: [] + description: + - if: + - payloadType: Issues + then: [] + description: + - if: + - payloadType: Issues + then: [] + description: + - if: + - payloadType: Issues + then: [] + description: + - if: + - payloadType: Pull_Request + - isAction: + action: Opened + then: + - addReply: + reply: >- + Thank you for creating a Pull Request @${issueAuthor}. + + + This is a checklist for the PR reviewer(s) to complete before approving and merging this PR: + + + - [ ] I have verified a documentation PR has been linked and is approved (or not applicable) + + - [ ] I have ran this PR locally and have tested the fix/feature + + - [ ] I have verified that stories have been added to storybook (or not applicable) + + - [ ] I have tested existing stories in storybook to verify no regression has occured + + - [ ] I have tested the solution in at least two browsers (Edge + 1 non-Chromium based browser) + description: +onFailure: +onSuccess: