diff --git a/.github/fabricbot.json b/.github/fabricbot.json deleted file mode 100644 index 37c4403daf2..00000000000 --- a/.github/fabricbot.json +++ /dev/null @@ -1,709 +0,0 @@ -{ - "version": "1.0", - "tasks": [ - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "config": { - "taskName": "Add needs triage 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": "Needs: triage :mag:" - } - } - ], - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ] - }, - "id": "Di2lxWQvMFj-3Tut8CKwf" - }, - { - "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" - } - }, - { - "name": "isOpen", - "parameters": {} - } - ] - }, - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "Needs: attention :wave:" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "Needs: author feedback" - } - } - ], - "eventType": "issue", - "eventNames": [ - "issue_comment" - ] - }, - "id": "yLCljQWKkXEL74UvWQYoU" - }, - { - "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": "MKXYh_2rYKB6pM2qZf3Ct" - }, - { - "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": "2l_sCwJqEl_935UDdtpC3" - }, - { - "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": "_ELig8gtQC0Y5N-DC685Q" - }, - { - "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": "yIzIv7_M2TLPzk32DTHAh" - }, - { - "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": "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": "uLWAW1HLPpAYDiv1b3f4F" - }, - { - "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, - "label_fixed": "fixed" - }, - "id": "heCHujhqOiXMtoYRlr7qL" - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssueCommentResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "operator": "not", - "operands": [ - { - "name": "isOpen", - "parameters": {} - } - ] - }, - { - "name": "isAction", - "parameters": { - "action": "created" - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "Status: no recent activity" - } - }, - { - "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": "Status: no recent activity" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "Needs: author feedback" - } - }, - { - "name": "addLabel", - "parameters": { - "label": "Needs: attention :wave:" - } - } - ] - }, - "id": "Ksy2TcUMLMGjusKZyFKD3" - }, - { - "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": "PPr3rs6KEp-0N3vbjIYMU" - } - ], - "userGroups": [] -} diff --git a/.github/policies/resourceManagement.yml b/.github/policies/resourceManagement.yml new file mode 100644 index 00000000000..8fbc37ed371 --- /dev/null +++ b/.github/policies/resourceManagement.yml @@ -0,0 +1,101 @@ +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: 'Status: no recent activity' + - noActivitySince: + days: 3 + actions: + - closeIssue + - description: + frequencies: + - hourly: + hour: 6 + filters: + - isIssue + - isOpen + - hasLabel: + label: 'Needs: author feedback' + - noActivitySince: + days: 4 + - isNotLabeledWith: + label: 'Status: no recent activity' + actions: + - addLabel: + label: 'Status: no recent activity' + - addReply: + reply: This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**. + - 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' + - 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 + then: + - inPrLabel: + label: 'Status: In PR' + description: +onFailure: +onSuccess: