diff --git a/.github/fabricbot.json b/.github/fabricbot.json deleted file mode 100644 index a12c7d8f..00000000 --- a/.github/fabricbot.json +++ /dev/null @@ -1,281 +0,0 @@ -{ - "version": "1.0", - "tasks": [ - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "or", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "opened" - } - }, - { - "name": "isAction", - "parameters": { - "action": "reopened" - } - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Add Needs-Triage label to new/reopened issue", - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "Needs-Triage" - } - } - ] - }, - "id": "kGz07l6ZZlBdjmWOvzCSX" - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "frequency": [ - { - "weekDay": 0, - "hours": [ - 7, - 19 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 1, - "hours": [ - 7, - 19 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 2, - "hours": [ - 7, - 19 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 3, - "hours": [ - 7, - 19 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 4, - "hours": [ - 7, - 19 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 5, - "hours": [ - 7, - 19 - ], - "timezoneOffset": -7 - }, - { - "weekDay": 6, - "hours": [ - 7, - 19 - ], - "timezoneOffset": -7 - } - ], - "searchTerms": [ - { - "name": "isIssue", - "parameters": {} - }, - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "hasLabel", - "parameters": { - "label": "Needs-Author Feedback" - } - }, - { - "name": "noActivitySince", - "parameters": { - "days": 7 - } - }, - { - "name": "noLabel", - "parameters": { - "label": "No Recent Activity" - } - } - ], - "taskName": "Add No Recent Activity label to issues", - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "No Recent Activity" - } - } - ] - }, - "id": "3t0AOopg98xoDTDovtGDd" - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssueCommentResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "isAction", - "parameters": { - "action": "created" - } - }, - { - "name": "isActivitySender", - "parameters": { - "user": { - "type": "author" - } - } - }, - { - "name": "hasLabel", - "parameters": { - "label": "Needs-Author Feedback" - } - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issue_comment" - ], - "taskName": "Replace Needs-Author Feedback label with Needs-Attention label when the author comments on an issue", - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "Needs-Attention" - } - }, - { - "name": "removeLabel", - "parameters": { - "label": "Needs-Author Feedback" - } - } - ] - }, - "id": "NvMxY3qKqAbNkQBADniut" - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssueCommentResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "No Recent Activity" - } - } - ] - }, - "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" - } - } - ] - }, - "id": "TYy2MaDX9VZk_wvQkAeb2" - }, - { - "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" - } - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Remove No Recent Activity label from issues", - "actions": [ - { - "name": "removeLabel", - "parameters": { - "label": "No Recent Activity" - } - } - ] - }, - "id": "KFOa6nD7c_MEqXbE-qvBX" - } - ], - "userGroups": [] -} diff --git a/.github/policies/resourceManagement.yml b/.github/policies/resourceManagement.yml new file mode 100644 index 00000000..158c0954 --- /dev/null +++ b/.github/policies/resourceManagement.yml @@ -0,0 +1,73 @@ +id: +name: GitOps.PullRequestIssueManagement +description: GitOps.PullRequestIssueManagement primitive +owner: +resource: repository +disabled: false +where: +configuration: + resourceManagementConfiguration: + scheduledSearches: + - description: + frequencies: + - hourly: + hour: 12 + filters: + - isIssue + - isOpen + - hasLabel: + label: Needs-Author Feedback + - noActivitySince: + days: 7 + - isNotLabeledWith: + label: No Recent Activity + actions: + - addLabel: + label: No Recent Activity + eventResponderTasks: + - if: + - payloadType: Issues + - or: + - isAction: + action: Opened + - isAction: + action: Reopened + then: + - addLabel: + label: Needs-Triage + description: + - if: + - payloadType: Issue_Comment + - isAction: + action: Created + - isActivitySender: + issueAuthor: True + - hasLabel: + label: Needs-Author Feedback + then: + - addLabel: + label: Needs-Attention + - removeLabel: + label: Needs-Author Feedback + description: + - if: + - payloadType: Issue_Comment + - hasLabel: + label: No Recent Activity + then: + - removeLabel: + label: No Recent Activity + description: + - if: + - payloadType: Issues + - not: + isAction: + action: Closed + - hasLabel: + label: No Recent Activity + then: + - removeLabel: + label: No Recent Activity + description: +onFailure: +onSuccess: