Onboarding to GitOps.ResourceManagement (#3678)

* Add prIssueManagement.yml to onboard repo to GitOps.ResourceManagement as FabricBot replacement

* Deleting fabricbot.json

---------

Co-authored-by: microsoft-github-policy-service[bot] <77245923+microsoft-github-policy-service[bot]@users.noreply.github.com>
This commit is contained in:
microsoft-github-policy-service[bot] 2024-03-05 12:14:06 -05:00 коммит произвёл GitHub
Родитель 82bd8e12e4
Коммит 708ae38d56
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
2 изменённых файлов: 178 добавлений и 805 удалений

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

@ -1,805 +0,0 @@
{
"version": "1.0",
"tasks": [
{
"taskType": "trigger",
"capabilityId": "IssueResponder",
"subCapability": "IssuesOnlyResponder",
"version": "1.0",
"config": {
"taskName": "Add needs triage label to new and reopened issues",
"conditions": {
"operator": "and",
"operands": [
{
"operator": "or",
"operands": [
{
"name": "isAction",
"parameters": {
"action": "reopened"
}
},
{
"operator": "and",
"operands": [
{
"name": "isAction",
"parameters": {
"action": "opened"
}
},
{
"operator": "not",
"operands": [
{
"name": "isLabeled",
"parameters": {}
}
]
},
{
"name": "activitySenderHasPermissions",
"parameters": {
"permissions": "write"
}
}
]
}
]
}
]
},
"actions": [
{
"name": "addLabel",
"parameters": {
"label": "needs-triage :mag:"
}
}
],
"eventType": "issue",
"eventNames": [
"issues",
"project_card"
]
},
"id": "6qLDUaFeMf3"
},
{
"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": "pDJvZLONr9f"
},
{
"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": "88hM3dqOeCz"
},
{
"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": "la1b2O5xAtt"
},
{
"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": 10
}
}
],
"actions": [
{
"name": "closeIssue",
"parameters": {}
}
]
},
"id": "md0c1jOGqxm"
},
{
"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": 10
}
},
{
"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 **10 days**. It will be closed if no further activity occurs **within 10 days of this comment**."
}
}
]
},
"id": "L3hYHI17Xt3"
},
{
"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": 3
}
}
],
"actions": [
{
"name": "addReply",
"parameters": {
"comment": "This issue has been marked as duplicate and has not had any activity for **3 days**. It will be closed for housekeeping purposes."
}
},
{
"name": "closeIssue",
"parameters": {}
}
]
},
"id": "vAWLATtcXoV"
},
{
"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
},
"id": "4fPRSdihPFO"
},
{
"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 \"needs-triage\" from issues when they're closed",
"actions": [
{
"name": "removeLabel",
"parameters": {
"label": "needs-triage :mag:"
}
}
]
},
"id": "sleyPlm3C"
},
{
"taskType": "trigger",
"capabilityId": "IssueResponder",
"subCapability": "IssueCommentResponder",
"version": "1.0",
"config": {
"conditions": {
"operator": "and",
"operands": [
{
"operator": "not",
"operands": [
{
"name": "isOpen",
"parameters": {}
}
]
},
{
"name": "hasLabel",
"parameters": {
"label": "needs-triage :mag:"
}
},
{
"operator": "or",
"operands": [
{
"name": "activitySenderHasPermissions",
"parameters": {
"permissions": "write"
}
},
{
"name": "activitySenderHasPermissions",
"parameters": {
"permissions": "admin"
}
}
]
}
]
},
"eventType": "issue",
"eventNames": [
"issue_comment"
],
"actions": [
{
"name": "removeLabel",
"parameters": {
"label": "needs-triage :mag:"
}
}
],
"taskName": "Remove \"needs-triage\" when a closed issue has a reply by someone from the team"
},
"id": "DGiIADMVbe"
},
{
"taskType": "trigger",
"capabilityId": "IssueResponder",
"subCapability": "PullRequestResponder",
"version": "1.0",
"config": {
"conditions": {
"operator": "or",
"operands": [
{
"name": "isAction",
"parameters": {
"action": "opened"
}
},
{
"name": "isAction",
"parameters": {
"action": "reopened"
}
}
]
},
"eventType": "pull_request",
"eventNames": [
"pull_request",
"issues",
"project_card"
],
"taskName": "Add needs-triage to new pull requests",
"actions": [
{
"name": "addLabel",
"parameters": {
"label": "needs-triage :mag:"
}
}
]
},
"id": "eFn9L1YQIf"
},
{
"taskType": "trigger",
"capabilityId": "IssueResponder",
"subCapability": "IssuesOnlyResponder",
"version": "1.0",
"id": "udD2g80f1",
"config": {
"conditions": {
"operator": "and",
"operands": [
{
"name": "hasLabel",
"parameters": {
"label": "feature proposal"
}
},
{
"operator": "and",
"operands": [
{
"name": "isAction",
"parameters": {
"action": "opened"
}
}
]
}
]
},
"eventType": "issue",
"eventNames": [
"issues",
"project_card"
],
"taskName": "Add new proposal issues to the project column 'freezer'",
"actions": [
{
"name": "addToProject",
"parameters": {
"projectName": "Proposal Tracking",
"columnName": "Freezer"
}
}
]
}
},
{
"taskType": "scheduled",
"capabilityId": "ScheduledSearch",
"subCapability": "ScheduledSearch",
"version": "1.1",
"id": "SKPGKN0Le",
"config": {
"frequency": [
{
"weekDay": 1,
"hours": [],
"timezoneOffset": -7
}
],
"searchTerms": [
{
"name": "isOpen",
"parameters": {}
},
{
"name": "isIssue",
"parameters": {}
},
{
"name": "noActivitySince",
"parameters": {
"days": 14
}
},
{
"name": "noLabel",
"parameters": {
"label": "feature proposal"
}
},
{
"name": "noLabel",
"parameters": {
"label": "discussion"
}
},
{
"name": "noLabel",
"parameters": {
"label": "status-no recent activity"
}
},
{
"name": "noLabel",
"parameters": {
"label": "needs-author-feedback"
}
},
{
"name": "noLabel",
"parameters": {
"label": "needs-triage :mag:"
}
}
],
"taskName": "Add needs-attention to issues that are not proposals that have had no activity for 2 weeks",
"actions": [
{
"name": "addLabel",
"parameters": {
"label": "needs-attention :wave:"
}
}
]
}
}
],
"userGroups": []
}

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

@ -0,0 +1,178 @@
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: 10
actions:
- closeIssue
- description:
frequencies:
- hourly:
hour: 6
filters:
- isIssue
- isOpen
- hasLabel:
label: needs-author feedback
- noActivitySince:
days: 10
- 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 **10 days**. It will be closed if no further activity occurs **within 10 days of this comment**.
- description:
frequencies:
- hourly:
hour: 6
filters:
- isIssue
- isOpen
- hasLabel:
label: duplicate
- noActivitySince:
days: 3
actions:
- addReply:
reply: This issue has been marked as duplicate and has not had any activity for **3 days**. It will be closed for housekeeping purposes.
- closeIssue
- description:
frequencies: []
filters:
- isOpen
- isIssue
- noActivitySince:
days: 14
- isNotLabeledWith:
label: feature proposal
- isNotLabeledWith:
label: discussion
- isNotLabeledWith:
label: status-no recent activity
- isNotLabeledWith:
label: needs-author-feedback
- isNotLabeledWith:
label: 'needs-triage :mag:'
actions:
- addLabel:
label: 'needs-attention :wave:'
eventResponderTasks:
- if:
- payloadType: Issues
- or:
- isAction:
action: Reopened
- and:
- isAction:
action: Opened
- not: isLabeled
- activitySenderHasPermission:
permission: Write
then:
- addLabel:
label: 'needs-triage :mag:'
description:
- 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:
- if:
- payloadType: Issues
- isAction:
action: Closed
then:
- removeLabel:
label: 'needs-triage :mag:'
description:
- if:
- payloadType: Issue_Comment
- not: isOpen
- hasLabel:
label: 'needs-triage :mag:'
- or:
- activitySenderHasPermission:
permission: Write
- activitySenderHasPermission:
permission: Admin
then:
- removeLabel:
label: 'needs-triage :mag:'
description:
- if:
- payloadType: Pull_Request
- or:
- isAction:
action: Opened
- isAction:
action: Reopened
then:
- addLabel:
label: 'needs-triage :mag:'
description:
- if:
- payloadType: Issues
- hasLabel:
label: feature proposal
- and:
- isAction:
action: Opened
then: []
description:
onFailure:
onSuccess: