From 9cbee48e02a352393a4a67d46cc0e2c1d3a46171 Mon Sep 17 00:00:00 2001 From: "microsoft-github-policy-service[bot]" <77245923+microsoft-github-policy-service[bot]@users.noreply.github.com> Date: Thu, 6 Jul 2023 13:51:31 +0000 Subject: [PATCH 1/2] Add prIssueManagement.yml to onboard repo to GitOps.ResourceManagement as FabricBot replacement Owners of the FabricBot configuration should have received email notification. The same information contained in the email is published internally at: https://aka.ms/gim/fabricbot. 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. --- .github/policies/resourceManagement.yml | 140 ++++++++++++++++++++++++ 1 file changed, 140 insertions(+) create mode 100644 .github/policies/resourceManagement.yml diff --git a/.github/policies/resourceManagement.yml b/.github/policies/resourceManagement.yml new file mode 100644 index 00000000..a32f7f88 --- /dev/null +++ b/.github/policies/resourceManagement.yml @@ -0,0 +1,140 @@ +id: +name: GitOps.PullRequestIssueManagement +description: GitOps.PullRequestIssueManagement primitive +owner: +resource: repository +disabled: false +where: +configuration: + resourceManagementConfiguration: + scheduledSearches: + - description: + frequencies: + - hourly: + hour: 6 + filters: + - isPullRequest + - isOpen + - hasLabel: + label: 'Needs: author feedback' + - hasLabel: + label: 'Status: 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: 'Status: no recent activity' + actions: + - addLabel: + label: 'Status: 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' + - isOpen + then: + - addLabel: + label: 'Needs: attention :wave:' + - removeLabel: + label: 'Needs: author feedback' + description: + - if: + - payloadType: Issues + - not: + isAction: + action: Closed + - hasLabel: + label: 'Status: No Recent Activity' + then: + - removeLabel: + label: 'Status: No Recent Activity' + description: + - if: + - payloadType: Issue_Comment + - hasLabel: + label: 'Status: No Recent Activity' + then: + - removeLabel: + label: 'Status: No Recent Activity' + 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: 'Status: no recent activity' + then: + - removeLabel: + label: 'Status: no recent activity' + description: + - if: + - payloadType: Issue_Comment + - hasLabel: + label: 'Status: no recent activity' + then: + - removeLabel: + label: 'Status: no recent activity' + description: + - if: + - payloadType: Pull_Request_Review + - hasLabel: + label: 'Status: no recent activity' + then: + - removeLabel: + label: 'Status: no recent activity' + description: +onFailure: +onSuccess: From eea2c6ec9737b19f83cf1a66d145a79525ffef5a Mon Sep 17 00:00:00 2001 From: "microsoft-github-policy-service[bot]" <77245923+microsoft-github-policy-service[bot]@users.noreply.github.com> Date: Thu, 6 Jul 2023 13:51:32 +0000 Subject: [PATCH 2/2] Deleting fabricbot.json --- .github/fabricbot.json | 1090 ---------------------------------------- 1 file changed, 1090 deletions(-) delete mode 100644 .github/fabricbot.json diff --git a/.github/fabricbot.json b/.github/fabricbot.json deleted file mode 100644 index 438cb2b8..00000000 --- a/.github/fabricbot.json +++ /dev/null @@ -1,1090 +0,0 @@ -{ - "version": "1.0", - "tasks": [ - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "config": { - "taskName": "Adds 'Needs: Triage' label for new issues", - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "opened" - } - }, - { - "operator": "not", - "operands": [ - { - "name": "isPartOfProject", - "parameters": {} - } - ] - }, - { - "operator": "not", - "operands": [ - { - "name": "isAssignedToSomeone", - "parameters": {} - } - ] - } - ] - }, - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "Needs: triage :mag:" - } - } - ], - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ] - }, - "id": "4yCFxJLAI" - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssueCommentResponder", - "version": "1.0", - "config": { - "taskName": "Replace 'Needs: Author Feedback' with 'Needs: Attention' label when author comments", - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "created" - } - }, - { - "name": "isActivitySender", - "parameters": { - "user": { - "type": "author" - } - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "Needs: author feedback" - } - }, - { - "name": "isOpen", - "parameters": {} - } - ] - }, - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "Needs: attention :wave:" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "Needs: author feedback" - } - } - ], - "eventType": "issue", - "eventNames": [ - "issue_comment" - ] - }, - "id": "Rb7BJHq_2r", - "disabled": false - }, - { - "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": "Status: No Recent Activity" - } - } - ] - }, - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "Status: No Recent Activity" - } - } - ], - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ] - }, - "id": "9eioe05kvI", - "disabled": false - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssueCommentResponder", - "version": "1.0", - "config": { - "taskName": "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" - ] - }, - "id": "qrbqb2HHzH", - "disabled": false - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "taskName": "Close stale issues", - "frequency": [ - { - "weekDay": 0, - "hours": [ - 1, - 7, - 13, - 19 - ] - }, - { - "weekDay": 1, - "hours": [ - 1, - 7, - 13, - 19 - ] - }, - { - "weekDay": 2, - "hours": [ - 1, - 7, - 13, - 19 - ] - }, - { - "weekDay": 3, - "hours": [ - 1, - 7, - 13, - 19 - ] - }, - { - "weekDay": 4, - "hours": [ - 1, - 7, - 13, - 19 - ] - }, - { - "weekDay": 5, - "hours": [ - 1, - 7, - 13, - 19 - ] - }, - { - "weekDay": 6, - "hours": [ - 1, - 7, - 13, - 19 - ] - } - ], - "searchTerms": [ - { - "name": "isIssue", - "parameters": {} - }, - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "hasLabel", - "parameters": { - "label": "Needs: Author Feedback" - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "Status: No Recent Activity" - } - }, - { - "name": "noActivitySince", - "parameters": { - "days": 3 - } - } - ], - "actions": [ - { - "name": "closeIssue", - "parameters": {} - } - ] - }, - "id": "KzKhdJFagg", - "disabled": true - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "taskName": "Add no recent activity label to issues", - "frequency": [ - { - "weekDay": 0, - "hours": [ - 2, - 8, - 14, - 20 - ] - }, - { - "weekDay": 1, - "hours": [ - 2, - 8, - 14, - 20 - ] - }, - { - "weekDay": 2, - "hours": [ - 2, - 8, - 14, - 20 - ] - }, - { - "weekDay": 3, - "hours": [ - 2, - 8, - 14, - 20 - ] - }, - { - "weekDay": 4, - "hours": [ - 2, - 8, - 14, - 20 - ] - }, - { - "weekDay": 5, - "hours": [ - 2, - 8, - 14, - 20 - ] - }, - { - "weekDay": 6, - "hours": [ - 2, - 8, - 14, - 20 - ] - } - ], - "searchTerms": [ - { - "name": "isIssue", - "parameters": {} - }, - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "hasLabel", - "parameters": { - "label": "Needs: Author Feedback" - } - }, - { - "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**." - } - } - ] - }, - "id": "9bACW8CIEe", - "disabled": true - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "taskName": "Close duplicate issues", - "frequency": [ - { - "weekDay": 0, - "hours": [ - 3, - 9, - 15, - 21 - ] - }, - { - "weekDay": 1, - "hours": [ - 3, - 9, - 15, - 21 - ] - }, - { - "weekDay": 2, - "hours": [ - 3, - 9, - 15, - 21 - ] - }, - { - "weekDay": 3, - "hours": [ - 3, - 9, - 15, - 21 - ] - }, - { - "weekDay": 4, - "hours": [ - 3, - 9, - 15, - 21 - ] - }, - { - "weekDay": 5, - "hours": [ - 3, - 9, - 15, - 21 - ] - }, - { - "weekDay": 6, - "hours": [ - 3, - 9, - 15, - 21 - ] - } - ], - "searchTerms": [ - { - "name": "isIssue", - "parameters": {} - }, - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "hasLabel", - "parameters": { - "label": "Resolution: 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": "1oYGJVXRb6", - "disabled": true - }, - { - "taskType": "trigger", - "capabilityId": "InPrLabel", - "subCapability": "InPrLabel", - "version": "1.0", - "config": { - "taskName": "Add 'In-PR' label on issue when an open pull request is targeting it", - "inPrLabelText": "Status: In PR", - "fixedLabelText": "Status: Fixed", - "fixedLabelEnabled": true - }, - "id": "hjek-RgbVA", - "disabled": true - }, - { - "taskType": "trigger", - "capabilityId": "CodeFlowLink", - "subCapability": "CodeFlowLink", - "version": "1.0", - "config": { - "taskName": "Add a CodeFlow link to new pull requests" - }, - "id": "NqXo_X011WD", - "disabled": true - }, - { - "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": "0bALtrkvsnh", - "disabled": true - }, - { - "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": "KlYxjL31MuN" - }, - { - "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": "2lYXQgiF2hv" - }, - { - "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": "rL79gKqPfK2" - }, - { - "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": "Status: no recent activity" - } - } - ] - }, - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "Status: no recent activity" - } - } - ], - "eventType": "pull_request", - "eventNames": [ - "pull_request", - "issues", - "project_card" - ] - }, - "id": "Gjw4LRoBH72" - }, - { - "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": "Status: no recent activity" - } - } - ] - }, - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "Status: no recent activity" - } - } - ], - "eventType": "pull_request", - "eventNames": [ - "issue_comment" - ] - }, - "id": "rVwtVIIs14A" - }, - { - "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": "Status: no recent activity" - } - } - ] - }, - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "Status: no recent activity" - } - } - ], - "eventType": "pull_request", - "eventNames": [ - "pull_request_review" - ] - }, - "id": "8iwdPHUEjjr" - }, - { - "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": "Status: no recent activity" - } - }, - { - "name": "noActivitySince", - "parameters": { - "days": 7 - } - } - ], - "actions": [ - { - "name": "closeIssue", - "parameters": {} - } - ] - }, - "id": "zvtputzVI9J" - }, - { - "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": "Status: no recent activity" - } - } - ], - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "Status: 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": "vg709CYhFLb", - "disabled": false - }, - { - "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 - }, - "id": "b_WeY3_vTMv", - "disabled": true - } - ], - "userGroups": [] -}