From e09c428908bb69395fb2686ac4e0f98dc1d5f9c6 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:55:09 +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 | 118 ++++++++++++++++++++++++ 1 file changed, 118 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 000000000..11a24acf6 --- /dev/null +++ b/.github/policies/resourceManagement.yml @@ -0,0 +1,118 @@ +id: +name: GitOps.PullRequestIssueManagement +description: GitOps.PullRequestIssueManagement primitive +owner: +resource: repository +disabled: false +where: +configuration: + resourceManagementConfiguration: + scheduledSearches: + - description: + frequencies: + - hourly: + hour: 6 + filters: + - isIssue + - isOpen + - hasLabel: + label: 'Needs: Author Feedback' + - hasLabel: + label: no-recent-activity + - noActivitySince: + days: 5 + - isNotLabeledWith: + label: service bug + actions: + - closeIssue + - description: + frequencies: + - hourly: + hour: 6 + 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: 6 + 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 + 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: Issues + - labelAdded: + label: service bug + then: [] + description: + - if: + - payloadType: Issue_Comment + - activitySenderHasAssociation: + association: Contributor + - bodyContains: + pattern: '?' + isRegex: False + - bodyContains: + pattern: '@' + isRegex: False + then: + - addLabel: + label: 'Needs: Author Feedback' + description: + - if: + - payloadType: Issues + - or: + - isAssignedToSomeone + - isAction: + action: Closed + then: + - removeLabel: + label: ToTriage + description: +onFailure: +onSuccess: From 8af39f3e2e6c6fdd6bf4016b87fd35f62889872b 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:55:10 +0000 Subject: [PATCH 2/2] Deleting fabricbot.json --- .github/fabricbot.json | 628 ----------------------------------------- 1 file changed, 628 deletions(-) delete mode 100644 .github/fabricbot.json diff --git a/.github/fabricbot.json b/.github/fabricbot.json deleted file mode 100644 index 711c22e76..000000000 --- a/.github/fabricbot.json +++ /dev/null @@ -1,628 +0,0 @@ -{ - "version": "1.0", - "tasks": [ - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "config": { - "taskName": "Add ToTriage label to 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": "ToTriage" - } - }, - { - "name": "addToProject", - "parameters": { - "projectName": "microsoftgraph/21", - "columnName": "", - "isOrgProject": true - } - } - ], - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ] - }, - "id": "wVYvFZh32" - }, - { - "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": "scOh-c1SJW" - }, - { - "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": "EqV7Zmgbpb" - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "taskName": "Close stale 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": "hasLabel", - "parameters": { - "label": "no-recent-activity" - } - }, - { - "name": "noActivitySince", - "parameters": { - "days": 5 - } - }, - { - "name": "noLabel", - "parameters": { - "label": "service bug" - } - } - ], - "actions": [ - { - "name": "closeIssue", - "parameters": {} - } - ] - }, - "id": "PiDnbnMb3L", - "disabled": false - }, - { - "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": "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": "EiiqLQ4Ptp", - "disabled": false - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "taskName": "Close duplicate 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": "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": "44lH51ck5p", - "disabled": false - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "config": { - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "conditions": { - "operator": "and", - "operands": [ - { - "name": "labelAdded", - "parameters": { - "label": "service bug" - } - } - ] - }, - "taskName": "Add service issue to Service Issues project", - "actions": [ - { - "name": "addToProject", - "parameters": { - "projectName": "Service issues", - "columnName": "Issues to triage", - "isOrgProject": true - } - } - ] - }, - "id": "OQic8Bzfpy" - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssueCommentResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "activitySenderHasAssociation", - "parameters": { - "permissions": "write", - "association": "CONTRIBUTOR" - } - }, - { - "name": "bodyContains", - "parameters": { - "bodyPattern": "?" - } - }, - { - "name": "bodyContains", - "parameters": { - "bodyPattern": "@" - } - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issue_comment" - ], - "taskName": "Set 'Needs Feedback' if we respond with a question and at mention", - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "Needs: Author Feedback" - } - } - ] - }, - "id": "6NEq5Zl6ji" - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "or", - "operands": [ - { - "name": "isAssignedToSomeone", - "parameters": {} - }, - { - "name": "isAction", - "parameters": { - "action": "closed" - } - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Remove ToTriage when assigned or response provided", - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "ToTriage" - } - } - ] - }, - "id": "9ZT7aUPI_Z" - } - ], - "userGroups": [] -}