This reverts commit e79abcfa78.
This commit is contained in:
Tomer Rosenthal 2023-07-17 10:27:47 -07:00 коммит произвёл GitHub
Родитель e79abcfa78
Коммит 8386e3b763
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 114 добавлений и 560 удалений

560
.github/policies/fabricbot.json поставляемый
Просмотреть файл

@ -1,560 +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"
]
}
},
{
"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"
]
}
},
{
"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"
]
}
},
{
"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"
]
}
},
{
"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": {}
}
]
}
},
{
"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**."
}
}
]
}
},
{
"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": {}
}
]
}
},
{
"taskType": "trigger",
"capabilityId": "IssueResponder",
"subCapability": "IssuesOnlyResponder",
"version": "1.0",
"config": {
"conditions": {
"operator": "and",
"operands": [
{
"name": "isAction",
"parameters": {
"action": "opened"
}
},
{
"name": "titleContains",
"parameters": {
"titlePattern": "Feature Request"
}
}
]
},
"eventType": "issue",
"eventNames": [
"issues",
"project_card"
],
"taskName": "Add enhancement label to feature requests",
"actions": [
{
"name": "addLabel",
"parameters": {
"label": "enhancement"
}
}
]
}
}
],
"userGroups": []
}

114
.github/policies/resourceManagement.yml поставляемый Normal file
Просмотреть файл

@ -0,0 +1,114 @@
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: 7
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: 'Resolution: 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: Issues
- isAction:
action: Opened
- titleContains:
pattern: Feature Request
isRegex: False
then:
- addLabel:
label: enhancement
description:
- if:
- payloadType: Issues
- isAction:
action: Opened
then:
- addLabel:
label: 'Needs: Triage :mag:'
description:
onFailure:
onSuccess: