Merge pull request #2800 from pnp/fabricbot-configuration-migration

Migrate FabricBot Tasks to Config-as-Code
This commit is contained in:
Hugo Bernier 2022-06-29 20:19:06 -07:00 committed by GitHub
commit 49a5d25724
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 969 additions and 0 deletions

969
.github/fabricbot.json vendored Normal file
View File

@ -0,0 +1,969 @@
{
"version": "1.0",
"tasks": [
{
"taskType": "trigger",
"capabilityId": "IssueResponder",
"subCapability": "IssueResponder",
"version": "1.0",
"config": {
"conditions": {
"operator": "and",
"operands": [
{
"name": "isEvent",
"parameters": {
"eventName": "issues"
}
},
{
"name": "isAction",
"parameters": {
"action": "opened"
}
},
{
"operator": "not",
"operands": [
{
"name": "isAssignedToSomeone",
"parameters": {}
}
]
}
]
},
"taskName": "Auto-label incoming issues as Needs Triage",
"actions": [
{
"name": "addReply",
"parameters": {
"comment": "Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible."
}
},
{
"name": "addLabels",
"parameters": {
"labels": [
"Needs: Triage :mag:"
]
}
}
]
},
"id": "_FrLNVmyb"
},
{
"taskType": "trigger",
"capabilityId": "IssueResponder",
"subCapability": "IssueResponder",
"version": "1.0",
"config": {
"conditions": {
"operator": "and",
"operands": [
{
"operator": "not",
"operands": [
{
"name": "isActivitySender",
"parameters": {
"user": "msft-github-bot"
}
}
]
},
{
"operator": "not",
"operands": [
{
"name": "isAction",
"parameters": {
"action": "closed"
}
}
]
},
{
"name": "hasLabel",
"parameters": {
"label": "no-recent-activity"
}
}
]
},
"taskName": "Remove no recent activity label",
"actions": [
{
"name": "removeLabel",
"parameters": {
"label": "no-recent-activity"
}
}
]
},
"id": "XgQc3JGUWy"
},
{
"taskType": "trigger",
"capabilityId": "IssueResponder",
"subCapability": "IssueResponder",
"version": "1.0",
"config": {
"conditions": {
"operator": "and",
"operands": [
{
"name": "isEvent",
"parameters": {
"eventName": "issue_comment"
}
},
{
"name": "isIssue",
"parameters": {}
},
{
"name": "isActivitySender",
"parameters": {
"user": {
"type": "author"
}
}
},
{
"name": "hasLabel",
"parameters": {
"label": "Needs: Author Feedback"
}
}
]
},
"taskName": "Add needs attention label to issues",
"actions": [
{
"name": "addLabels",
"parameters": {
"labels": [
"Needs: Attention :wave:"
]
}
}
]
},
"id": "qncidkvqrI"
},
{
"taskType": "trigger",
"capabilityId": "IssueResponder",
"subCapability": "IssueResponder",
"version": "1.0",
"config": {
"conditions": {
"operator": "and",
"operands": [
{
"name": "isActivitySender",
"parameters": {
"user": {
"type": "author"
}
}
},
{
"operator": "not",
"operands": [
{
"name": "isAction",
"parameters": {
"action": "closed"
}
}
]
},
{
"name": "hasLabel",
"parameters": {
"label": "Needs: Author Feedback"
}
}
]
},
"taskName": "Remove needs author feedback label from issues and pull requests",
"actions": [
{
"name": "removeLabel",
"parameters": {
"label": "Needs: Author Feedback"
}
}
]
},
"id": "KfryfubNkp"
},
{
"taskType": "scheduled",
"capabilityId": "ScheduledSearch",
"subCapability": "ScheduledSearch",
"version": "1.0",
"config": {
"taskName": "Close stale issues",
"frequency": [
{
"weekDay": 0,
"hours": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23
]
},
{
"weekDay": 1,
"hours": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23
]
},
{
"weekDay": 2,
"hours": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23
]
},
{
"weekDay": 3,
"hours": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23
]
},
{
"weekDay": 4,
"hours": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23
]
},
{
"weekDay": 5,
"hours": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23
]
},
{
"weekDay": 6,
"hours": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23
]
}
],
"searchTerms": [
{
"name": "isIssue",
"parameters": {}
},
{
"name": "isOpen",
"parameters": {}
},
{
"name": "hasLabel",
"parameters": {
"label": "Needs: Author Feedback"
}
},
{
"name": "hasLabel",
"parameters": {
"label": "no-recent-activity"
}
},
{
"name": "noActivitySince",
"parameters": {
"days": 7
}
}
],
"actions": [
{
"name": "closeIssue",
"parameters": {}
},
{
"name": "addReply",
"parameters": {
"comment": "Closing issue due no response from original author. If this issue is still occurring, please open a new issue with additional details. Notice that if you have included another related issue as additional comment on this, please open that also as separate issue, so that we can track it independently. "
}
}
]
},
"id": "xhkCxOyLg3"
},
{
"taskType": "scheduled",
"capabilityId": "ScheduledSearch",
"subCapability": "ScheduledSearch",
"version": "1.0",
"config": {
"frequency": [
{
"weekDay": 0,
"hours": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23
]
},
{
"weekDay": 1,
"hours": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23
]
},
{
"weekDay": 2,
"hours": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23
]
},
{
"weekDay": 3,
"hours": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23
]
},
{
"weekDay": 4,
"hours": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23
]
},
{
"weekDay": 5,
"hours": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23
]
},
{
"weekDay": 6,
"hours": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23
]
}
],
"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"
}
}
],
"actions": [
{
"name": "addLabels",
"parameters": {
"labels": [
"no-recent-activity"
]
}
},
{
"name": "addReply",
"parameters": {
"comment": "This issue has been automatically marked as stale because it has marked as requiring author feedback but has not had any activity for **7 days**. It will be closed if no further activity occurs **within next 7 days of this comment**. Thank you for your contributions to SharePoint Developer activities."
}
}
],
"taskName": "Mark issue with no-recent-activity label if there's no actions in 7 days"
},
"id": "pWfvfK_kKh"
},
{
"taskType": "scheduled",
"capabilityId": "ScheduledSearch",
"subCapability": "ScheduledSearch",
"version": "1.1",
"config": {
"taskName": "Closed answered issues in 7 days",
"frequency": [
{
"weekDay": 0,
"hours": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23
]
},
{
"weekDay": 1,
"hours": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23
]
},
{
"weekDay": 2,
"hours": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23
]
},
{
"weekDay": 3,
"hours": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23
]
},
{
"weekDay": 4,
"hours": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23
]
},
{
"weekDay": 5,
"hours": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23
]
},
{
"weekDay": 6,
"hours": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23
]
}
],
"searchTerms": [
{
"name": "isIssue",
"parameters": {}
},
{
"name": "isOpen",
"parameters": {}
},
{
"name": "hasLabel",
"parameters": {
"label": "status:answered"
}
},
{
"name": "noActivitySince",
"parameters": {
"days": 3
}
}
],
"actions": [
{
"name": "closeIssue",
"parameters": {}
},
{
"name": "addReply",
"parameters": {
"comment": "Closing issue as \"answered\". If you encounter similar issue(s), please open up a NEW issue. Thank you."
}
}
]
},
"id": "FPQDPkT-gN"
}
],
"userGroups": []
}