Migrate FabricBot Tasks to Config-as-Code (#3262)

* Add `.github/fabricbot.json`

* Clean-up.

Co-authored-by: msftbot[bot] <48340428+msftbot[bot]@users.noreply.github.com>
Co-authored-by: Pawel Winogrodzki <pawelwi@microsoft.com>
This commit is contained in:
msftbot[bot] 2022-07-05 10:49:11 -07:00 коммит произвёл GitHub
Родитель 4c12ae94e0
Коммит f8a20afb91
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 141 добавлений и 0 удалений

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

@ -0,0 +1,141 @@
{
"version": "1.0",
"tasks": [
{
"taskType": "trigger",
"capabilityId": "PrAutoLabel",
"subCapability": "Path",
"version": "1.0",
"id": "ldNQNnhTM",
"config": {
"taskName": "Add tags (paths)",
"configs": [
{
"label": "Packaging",
"pathFilter": [
"SPECS/",
"SPECS-SIGNED/"
]
},
{
"label": "documentation",
"pathFilter": [
"toolkit/docs/"
]
},
{
"label": "Tools",
"pathFilter": [
"toolkit/tools/",
"toolkit/scripts/"
]
},
{
"label": "Schema",
"pathFilter": [
"toolkit/imageconfigs/",
"toolkit/tools/imagegen/configuration"
]
}
]
}
},
{
"taskType": "trigger",
"capabilityId": "IssueResponder",
"subCapability": "PullRequestResponder",
"version": "1.0",
"id": "znSU-jzNE",
"config": {
"taskName": "Apply security tag for CVE patches",
"conditions": {
"operator": "and",
"operands": [
{
"name": "prMatchesPattern",
"parameters": {
"matchRegex": "(CVE|cve)-\\d+-\\d+\\.(no)?patch"
}
}
]
},
"eventType": "pull_request",
"eventNames": [
"pull_request",
"issues",
"project_card"
],
"actions": [
{
"name": "addLabel",
"parameters": {
"label": "security"
}
}
]
}
},
{
"taskType": "trigger",
"capabilityId": "IssueResponder",
"subCapability": "PullRequestResponder",
"version": "1.0",
"id": "7jJOHIRF6",
"config": {
"taskName": "Add label for automatic PRs",
"conditions": {
"operator": "and",
"operands": [
{
"name": "isAction",
"parameters": {
"action": "opened"
}
},
{
"name": "isActivitySender",
"parameters": {
"user": "CBL-Mariner-Bot"
}
}
]
},
"eventType": "pull_request",
"eventNames": [
"pull_request",
"issues",
"project_card"
],
"actions": [
{
"name": "addLabel",
"parameters": {
"label": "Automatic PR"
}
}
]
}
},
{
"taskType": "trigger",
"capabilityId": "PrAutoLabel",
"subCapability": "Branch",
"version": "1.0",
"id": "lBG0b8Sb8Mpdm0byiViDh",
"config": {
"taskName": "Add labels for PRs to common branches",
"configs": [
{
"label": "1.0-dev",
"branchName": "1.0-dev"
},
{
"label": "main",
"branchName": "main"
}
]
}
}
],
"userGroups": []
}