diff --git a/.github/fabricbot.json b/.github/fabricbot.json deleted file mode 100644 index 84a4b438bd4..00000000000 --- a/.github/fabricbot.json +++ /dev/null @@ -1,919 +0,0 @@ -{ - "version": "1.0", - "tasks": [ - { - "taskType": "trigger", - "capabilityId": "CodeFlowLink", - "subCapability": "CodeFlowLink", - "version": "1.0", - "config": { - "taskName": "Add a CodeFlow link to new pull requests" - } - }, - { - "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": "waiting-author-feedback :mailbox_with_no_mail:" - } - } - ], - "eventType": "pull_request", - "eventNames": [ - "pull_request_review" - ] - } - }, - { - "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": "waiting-author-feedback :mailbox_with_no_mail:" - } - } - ] - }, - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "waiting-author-feedback :mailbox_with_no_mail:" - } - } - ], - "eventType": "pull_request", - "eventNames": [ - "pull_request", - "issues", - "project_card" - ] - } - }, - { - "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": "waiting-author-feedback :mailbox_with_no_mail:" - } - } - ] - }, - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "waiting-author-feedback :mailbox_with_no_mail:" - } - } - ], - "eventType": "pull_request", - "eventNames": [ - "issue_comment" - ] - } - }, - { - "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": "waiting-author-feedback :mailbox_with_no_mail:" - } - } - ] - }, - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "waiting-author-feedback :mailbox_with_no_mail:" - } - } - ], - "eventType": "pull_request", - "eventNames": [ - "pull_request_review" - ] - } - }, - { - "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 :zzz:" - } - } - ] - }, - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "no-recent-activity :zzz:" - } - } - ], - "eventType": "pull_request", - "eventNames": [ - "pull_request", - "issues", - "project_card" - ] - } - }, - { - "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 :zzz:" - } - } - ] - }, - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "no-recent-activity :zzz:" - } - } - ], - "eventType": "pull_request", - "eventNames": [ - "issue_comment" - ] - } - }, - { - "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 :zzz:" - } - } - ] - }, - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "no-recent-activity :zzz:" - } - } - ], - "eventType": "pull_request", - "eventNames": [ - "pull_request_review" - ] - } - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "taskName": "Close stale issues and pull requests", - "frequency": [ - { - "weekDay": 0, - "hours": [ - 2, - 14 - ], - "timezoneOffset": 11 - }, - { - "weekDay": 1, - "hours": [ - 2, - 14 - ], - "timezoneOffset": 11 - }, - { - "weekDay": 2, - "hours": [ - 2, - 14 - ], - "timezoneOffset": 11 - }, - { - "weekDay": 3, - "hours": [ - 2, - 14 - ], - "timezoneOffset": 11 - }, - { - "weekDay": 4, - "hours": [ - 2, - 14 - ], - "timezoneOffset": 11 - }, - { - "weekDay": 5, - "hours": [ - 2, - 14 - ], - "timezoneOffset": 11 - }, - { - "weekDay": 6, - "hours": [ - 2, - 14 - ], - "timezoneOffset": 11 - } - ], - "searchTerms": [ - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "hasLabel", - "parameters": { - "label": "waiting-author-feedback :mailbox_with_no_mail:" - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "no-recent-activity :zzz:" - } - }, - { - "name": "noActivitySince", - "parameters": { - "days": 7 - } - } - ], - "actions": [ - { - "name": "closeIssue", - "parameters": {} - }, - { - "name": "removeMilestone", - "parameters": {} - } - ] - } - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "taskName": "Add no recent activity label to issues and pull requests", - "frequency": [ - { - "weekDay": 0, - "hours": [ - 2, - 5, - 8, - 11, - 14, - 17, - 20, - 23 - ], - "timezoneOffset": 10 - }, - { - "weekDay": 1, - "hours": [ - 2, - 5, - 8, - 11, - 14, - 17, - 20, - 23 - ], - "timezoneOffset": 10 - }, - { - "weekDay": 2, - "hours": [ - 2, - 5, - 8, - 11, - 14, - 17, - 20, - 23 - ], - "timezoneOffset": 10 - }, - { - "weekDay": 3, - "hours": [ - 2, - 5, - 8, - 11, - 14, - 17, - 20, - 23 - ], - "timezoneOffset": 10 - }, - { - "weekDay": 4, - "hours": [ - 2, - 5, - 8, - 11, - 14, - 17, - 20, - 23 - ], - "timezoneOffset": 10 - }, - { - "weekDay": 5, - "hours": [ - 2, - 5, - 8, - 11, - 14, - 17, - 20, - 23 - ], - "timezoneOffset": 10 - }, - { - "weekDay": 6, - "hours": [ - 2, - 5, - 8, - 11, - 14, - 17, - 20, - 23 - ], - "timezoneOffset": 10 - } - ], - "searchTerms": [ - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "hasLabel", - "parameters": { - "label": "waiting-author-feedback :mailbox_with_no_mail:" - } - }, - { - "name": "noActivitySince", - "parameters": { - "days": 14 - } - }, - { - "name": "noLabel", - "parameters": { - "label": "no-recent-activity :zzz:" - } - } - ], - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "no-recent-activity :zzz:" - } - }, - { - "name": "addReply", - "parameters": { - "comment": "This submission has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **14 days**. \n\nIt will be closed if no further activity occurs **within 7 days of this comment**." - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "AutoMerge", - "subCapability": "AutoMerge", - "version": "1.0", - "config": { - "taskName": "Automatically merge pull requests", - "label": "automerge :octocat:", - "silentMode": false, - "minMinutesOpen": "60", - "mergeType": "squash", - "deleteBranches": true, - "requireAllStatuses": false, - "removeLabelOnPush": true, - "allowAutoMergeInstructionsWithoutLabel": true, - "conditionalMergeTypes": [ - { - "mergeType": "squash", - "condition": { - "placeholder": "" - } - } - ], - "usePrDescriptionAsCommitMessage": true - }, - "disabled": false - }, - { - "taskType": "trigger", - "capabilityId": "InPrLabel", - "subCapability": "InPrLabel", - "version": "1.0", - "config": { - "taskName": "In-PR label", - "label_inPr": "work in progress :construction:", - "fixedLabelEnabled": false, - "label_fixed": "tell-mode" - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "prTargetsBranch", - "parameters": { - "branchName": "main" - } - }, - { - "operator": "and", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "merged" - } - }, - { - "operator": "not", - "operands": [ - { - "name": "titleContains", - "parameters": { - "titlePattern": "[main] Update dependencies" - } - } - ] - } - ] - } - ] - }, - "eventType": "pull_request", - "eventNames": [ - "pull_request", - "issues", - "project_card" - ], - "actions": [ - { - "name": "addMilestone", - "parameters": { - "milestoneName": "8.1" - } - } - ], - "taskName": "Apply milestone to PRs on the main branch", - "dangerZone": { - "respondToBotActions": true, - "acceptRespondToBotActions": true - } - }, - "disabled": false - }, - { - "taskType": "trigger", - "capabilityId": "EmailCleanser", - "subCapability": "EmailCleanser", - "version": "1.0", - "config": { - "taskName": "Cleanse emails" - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [] - }, - "eventType": "pull_request", - "eventNames": [ - "pull_request", - "issues", - "project_card" - ], - "actions": [ - { - "name": "assignToUser", - "parameters": { - "user": { - "type": "prAuthor" - } - } - } - ], - "taskName": "Assign PRs to authors" - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssueCommentResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isActivitySender", - "parameters": { - "user": { - "type": "author" - } - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "waiting-author-feedback :mailbox_with_no_mail:" - } - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issue_comment" - ], - "taskName": "Remove needs author feedback label when the author comments on an issue", - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "waiting-author-feedback :mailbox_with_no_mail:" - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssueCommentResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "no-recent-activity :zzz:" - } - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issue_comment" - ], - "taskName": "Remove no recent activity label when an issue is commented on", - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "no-recent-activity :zzz:" - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "operator": "not", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "closed" - } - } - ] - }, - { - "name": "hasLabel", - "parameters": { - "label": "no-recent-activity :zzz:" - } - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Remove no recent activity label from issue", - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "no-recent-activity :zzz:" - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "closed" - } - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Remove closed issues from milestones", - "actions": [ - { - "name": "removeMilestone", - "parameters": {} - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "PullRequestResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "or", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "merged" - } - }, - { - "name": "isAction", - "parameters": { - "action": "closed" - } - } - ] - }, - "eventType": "pull_request", - "eventNames": [ - "pull_request", - "issues", - "project_card" - ], - "taskName": "Remove intermediate labels after PR is closed or merged", - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "work in progress :construction:" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "waiting-author-feedback :mailbox_with_no_mail:" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "waiting-on-team :wave:" - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "or", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "closed" - } - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Remove intermediate labels from closed issue", - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "untriaged" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "waiting-author-feedback :mailbox_with_no_mail:" - } - } - ] - } - } - ], - "userGroups": [] -} diff --git a/.github/policies/resourceManagement.yml b/.github/policies/resourceManagement.yml new file mode 100644 index 00000000000..610112662c3 --- /dev/null +++ b/.github/policies/resourceManagement.yml @@ -0,0 +1,220 @@ +id: +name: GitOps.PullRequestIssueManagement +description: GitOps.PullRequestIssueManagement primitive +owner: +resource: repository +disabled: false +where: +configuration: + resourceManagementConfiguration: + scheduledSearches: + - description: Close stale issues and pull requests + frequencies: + - hourly: + hour: 12 + filters: + - isOpen + - hasLabel: + label: 'waiting-author-feedback :mailbox_with_no_mail:' + - hasLabel: + label: 'no-recent-activity :zzz:' + - noActivitySince: + days: 7 + actions: + - closeIssue + - removeMilestone + - description: Add no recent activity label to issues and pull requests + frequencies: + - hourly: + hour: 3 + filters: + - isOpen + - hasLabel: + label: 'waiting-author-feedback :mailbox_with_no_mail:' + - noActivitySince: + days: 14 + - isNotLabeledWith: + label: 'no-recent-activity :zzz:' + actions: + - addLabel: + label: 'no-recent-activity :zzz:' + - addReply: + reply: >- + This submission has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **14 days**. + + + It will be closed if no further activity occurs **within 7 days of this comment**. + eventResponderTasks: + - if: + - payloadType: Pull_Request + - isAction: + action: Opened + then: + - addCodeFlowLink + description: Add a CodeFlow link to new pull requests + - if: + - payloadType: Pull_Request_Review + - isAction: + action: Submitted + - isReviewState: + reviewState: Changes_requested + then: + - addLabel: + label: 'waiting-author-feedback :mailbox_with_no_mail:' + description: Add needs author feedback label to pull requests when changes are requested + - if: + - payloadType: Pull_Request + - isActivitySender: + issueAuthor: True + - not: + isAction: + action: Closed + - hasLabel: + label: 'waiting-author-feedback :mailbox_with_no_mail:' + then: + - removeLabel: + label: 'waiting-author-feedback :mailbox_with_no_mail:' + description: Remove needs author feedback label when the author responds to a pull request + - if: + - payloadType: Issue_Comment + - isActivitySender: + issueAuthor: True + - hasLabel: + label: 'waiting-author-feedback :mailbox_with_no_mail:' + then: + - removeLabel: + label: 'waiting-author-feedback :mailbox_with_no_mail:' + description: Remove needs author feedback label when the author comments on a pull request + - if: + - payloadType: Pull_Request_Review + - isActivitySender: + issueAuthor: True + - hasLabel: + label: 'waiting-author-feedback :mailbox_with_no_mail:' + then: + - removeLabel: + label: 'waiting-author-feedback :mailbox_with_no_mail:' + description: Remove needs author feedback label when the author responds to a pull request review comment + - if: + - payloadType: Pull_Request + - not: + isAction: + action: Closed + - hasLabel: + label: 'no-recent-activity :zzz:' + then: + - removeLabel: + label: 'no-recent-activity :zzz:' + description: Remove no recent activity label from pull requests + - if: + - payloadType: Issue_Comment + - hasLabel: + label: 'no-recent-activity :zzz:' + then: + - removeLabel: + label: 'no-recent-activity :zzz:' + description: Remove no recent activity label when a pull request is commented on + - if: + - payloadType: Pull_Request_Review + - hasLabel: + label: 'no-recent-activity :zzz:' + then: + - removeLabel: + label: 'no-recent-activity :zzz:' + description: Remove no recent activity label when a pull request is reviewed + - if: + - payloadType: Pull_Request + - hasLabel: + label: 'automerge :octocat:' + then: + - enableAutoMerge: + mergeMethod: Squash + description: Automatically merge pull requests + - if: + - payloadType: Pull_Request + - labelRemoved: + label: 'automerge :octocat:' + then: + - disableAutoMerge + description: Automatically merge pull requests + - if: + - payloadType: Pull_Request + then: + - inPrLabel: + label: 'work in progress :construction:' + description: In-PR label + - if: + - payloadType: Issue_Comment + then: + - cleanEmailReply + description: Cleanse emails + - if: + - payloadType: Pull_Request + then: + - assignTo: + author: True + description: Assign PRs to authors + - if: + - payloadType: Issue_Comment + - isActivitySender: + issueAuthor: True + - hasLabel: + label: 'waiting-author-feedback :mailbox_with_no_mail:' + then: + - removeLabel: + label: 'waiting-author-feedback :mailbox_with_no_mail:' + description: Remove needs author feedback label when the author comments on an issue + - if: + - payloadType: Issue_Comment + - hasLabel: + label: 'no-recent-activity :zzz:' + then: + - removeLabel: + label: 'no-recent-activity :zzz:' + description: Remove no recent activity label when an issue is commented on + - if: + - payloadType: Issues + - not: + isAction: + action: Closed + - hasLabel: + label: 'no-recent-activity :zzz:' + then: + - removeLabel: + label: 'no-recent-activity :zzz:' + description: Remove no recent activity label from issue + - if: + - payloadType: Issues + - isAction: + action: Closed + then: + - removeMilestone + description: Remove closed issues from milestones + - if: + - payloadType: Pull_Request + - or: + - isAction: + action: Null + - isAction: + action: Closed + then: + - removeLabel: + label: 'work in progress :construction:' + - removeLabel: + label: 'waiting-author-feedback :mailbox_with_no_mail:' + - removeLabel: + label: 'waiting-on-team :wave:' + description: Remove intermediate labels after PR is closed or merged + - if: + - payloadType: Issues + - or: + - isAction: + action: Closed + then: + - removeLabel: + label: untriaged + - removeLabel: + label: 'waiting-author-feedback :mailbox_with_no_mail:' + description: Remove intermediate labels from closed issue +onFailure: +onSuccess: