Onboarding to GitOps.ResourceManagement (#26863)

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

* Deleting fabricbot.json

* Update resourceManagement.yml

* Update expect.txt

* Update .github/policies/resourceManagement.yml

Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com>

---------

Co-authored-by: microsoft-github-policy-service[bot] <77245923+microsoft-github-policy-service[bot]@users.noreply.github.com>
Co-authored-by: Clint Rutkas <clint@rutkas.com>
Co-authored-by: Heiko <61519853+htcfreek@users.noreply.github.com>
This commit is contained in:
microsoft-github-policy-service[bot]
2023-06-28 11:48:08 +02:00
committed by GitHub
parent 63c624b273
commit cb4ee89623
3 changed files with 217 additions and 929 deletions

View File

@@ -1083,6 +1083,7 @@ lexon
lhs
lhwnd
LIBID
licate
LIGHTORANGE
LIGHTTURQUOISE
lindex
@@ -1332,6 +1333,7 @@ NCRBUTTONUP
NCRENDERING
ndp
NEEDDISPATCH
needinfo
Nemeth
NESW
netcore
@@ -1717,6 +1719,7 @@ renamable
RENAMEONCOLLISION
Renamer
reparse
reportbug
requery
requerying
rescap

929
.github/fabricbot.json vendored
View File

@@ -1,929 +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"
}
}
],
"eventType": "issue",
"eventNames": [
"issues",
"project_card"
]
},
"id": "eUOhvA_62"
},
{
"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-Triage"
}
},
{
"name": "removeLabel",
"parameters": {
"label": "Needs-Author-Feedback"
}
},
{
"name": "addLabel",
"parameters": {
"label": "Needs-Team-Response"
}
}
],
"eventType": "issue",
"eventNames": [
"issue_comment"
]
},
"id": "kgfxdBIu_9"
},
{
"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": "eR-TaGJJzW",
"disabled": false
},
{
"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": "tXKeoDht_g",
"disabled": false
},
{
"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": 5
}
}
],
"actions": [
{
"name": "closeIssue",
"parameters": {}
}
]
},
"id": "8yr-nVZj9k",
"disabled": false
},
{
"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": 5
}
},
{
"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 **5 days**. It will be closed if no further activity occurs **within 5 days of this comment**."
}
}
]
},
"id": "DAhxoYjVcq",
"disabled": false
},
{
"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": {}
}
]
},
"id": "xGhARy1H0w"
},
{
"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,
"label_fixed": "Resolution-Fix-Committed",
"label_inPr": "In progress"
},
"id": "Rn1tANe62T"
},
{
"taskType": "trigger",
"capabilityId": "EmailCleanser",
"subCapability": "EmailCleanser",
"version": "1.0",
"id": "X0O-6aZ1v3_DAmhUIcNb2",
"config": {
"taskName": "Clean the email stuff"
}
},
{
"taskType": "trigger",
"capabilityId": "IssueResponder",
"subCapability": "IssueCommentResponder",
"version": "1.0",
"id": "VyV9JJSA8SbOyeWEwjyfL",
"config": {
"conditions": {
"operator": "and",
"operands": [
{
"name": "commentContains",
"parameters": {
"commentPattern": "\\/(bugreport|reportbug)",
"isRegex": true
}
},
{
"operator": "or",
"operands": [
{
"name": "activitySenderHasAssociation",
"parameters": {
"permissions": "admin",
"association": "MEMBER"
}
},
{
"name": "activitySenderHasAssociation",
"parameters": {
"association": "OWNER"
}
},
{
"name": "activitySenderHasAssociation",
"parameters": {
"association": "COLLABORATOR"
}
}
]
}
]
},
"eventType": "issue",
"eventNames": [
"issue_comment"
],
"taskName": "Ask for bug report zip file",
"actions": [
{
"name": "removeLabel",
"parameters": {
"label": "Needs-Triage"
}
},
{
"name": "addLabel",
"parameters": {
"label": "Needs-Author-Feedback"
}
},
{
"name": "addReply",
"parameters": {
"comment": "Hi there!<br/><br/>We need a bit more information to really debug this issue. Can you add a \"Report Bug\" zip file here? You right click on our system tray icon and just go to report bug. Then drag the zipfile from your desktop onto the GitHub comment box in this issue. Thanks! <br/>![Report Bug](https://user-images.githubusercontent.com/11349917/133042052-4975be21-4699-4363-83c9-a8e1869d079d.png)"
}
},
{
"name": "removeLabel",
"parameters": {
"label": "Needs-Team-Response"
}
}
]
}
},
{
"taskType": "trigger",
"capabilityId": "IssueResponder",
"subCapability": "IssueCommentResponder",
"version": "1.0",
"id": "bvMkigH2HPgUniYFCNco9",
"config": {
"conditions": {
"operator": "and",
"operands": [
{
"name": "commentContains",
"parameters": {
"isRegex": true,
"commentPattern": "\\/feedback[H|h]ub"
}
},
{
"operator": "or",
"operands": [
{
"name": "activitySenderHasAssociation",
"parameters": {
"association": "OWNER"
}
},
{
"name": "activitySenderHasAssociation",
"parameters": {
"association": "MEMBER"
}
},
{
"name": "activitySenderHasAssociation",
"parameters": {
"association": "COLLABORATOR"
}
}
]
}
]
},
"eventType": "issue",
"eventNames": [
"issue_comment"
],
"taskName": "Helper to mark as feedback hub",
"actions": [
{
"name": "addReply",
"parameters": {
"comment": "Hi! We've identified this issue that best is suited for Windows Feedback Hub. To do this on Windows, WinKey+F will bring it up!"
}
},
{
"name": "closeIssue",
"parameters": {}
},
{
"name": "removeLabel",
"parameters": {
"label": "Needs-Triage"
}
},
{
"name": "removeLabel",
"parameters": {
"label": "Needs-Team-Response"
}
},
{
"name": "addLabel",
"parameters": {
"label": "Resolution-Please File on Feedback Hub"
}
}
]
}
},
{
"taskType": "trigger",
"capabilityId": "IssueResponder",
"subCapability": "IssueCommentResponder",
"version": "1.0",
"id": "bvMkigH2HPgUniYFCNco8",
"config": {
"conditions": {
"operator": "and",
"operands": [
{
"name": "commentContains",
"parameters": {
"isRegex": true,
"commentPattern": "\\/dup(licate|e)?(\\s+of)?\\s+(#[\\d]+|https)"
}
},
{
"operator": "or",
"operands": [
{
"name": "activitySenderHasAssociation",
"parameters": {
"association": "OWNER"
}
},
{
"name": "activitySenderHasAssociation",
"parameters": {
"association": "MEMBER"
}
},
{
"name": "activitySenderHasAssociation",
"parameters": {
"association": "COLLABORATOR"
}
}
]
}
]
},
"eventType": "issue",
"eventNames": [
"issue_comment"
],
"taskName": "Helper to mark as duplicate",
"actions": [
{
"name": "addReply",
"parameters": {
"comment": "Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!"
}
},
{
"name": "closeIssue",
"parameters": {}
},
{
"name": "removeLabel",
"parameters": {
"label": "Needs-Triage"
}
},
{
"name": "removeLabel",
"parameters": {
"label": "Needs-Team-Response"
}
},
{
"name": "addLabel",
"parameters": {
"label": "Resolution-Duplicate"
}
}
]
}
},
{
"taskType": "trigger",
"capabilityId": "IssueResponder",
"subCapability": "IssueCommentResponder",
"version": "1.0",
"id": "mgZxIoqeF7GWUo7-tZF56",
"config": {
"conditions": {
"operator": "and",
"operands": [
{
"name": "commentContains",
"parameters": {
"commentPattern": "\\/needinfo",
"isRegex": true
}
},
{
"operator": "or",
"operands": [
{
"name": "activitySenderHasAssociation",
"parameters": {
"association": "OWNER"
}
},
{
"name": "activitySenderHasAssociation",
"parameters": {
"association": "MEMBER"
}
},
{
"name": "activitySenderHasAssociation",
"parameters": {
"association": "COLLABORATOR"
}
}
]
}
]
},
"eventType": "issue",
"eventNames": [
"issue_comment"
],
"actions": [
{
"name": "removeLabel",
"parameters": {
"label": "Needs-Triage"
}
},
{
"name": "removeLabel",
"parameters": {
"label": "Needs-Team-Response"
}
},
{
"name": "addLabel",
"parameters": {
"label": "Needs-Author-Feedback"
}
}
],
"taskName": "Author Response needed"
}
},
{
"taskType": "trigger",
"capabilityId": "IssueResponder",
"subCapability": "IssueCommentResponder",
"version": "1.0",
"id": "mgZxIoqeF7GWUo7-t3773",
"config": {
"conditions": {
"operator": "and",
"operands": [
{
"name": "commentContains",
"parameters": {
"commentPattern": "\\/loc\\b",
"isRegex": true
}
},
{
"operator": "or",
"operands": [
{
"name": "activitySenderHasAssociation",
"parameters": {
"association": "OWNER"
}
},
{
"name": "activitySenderHasAssociation",
"parameters": {
"association": "MEMBER"
}
}
]
}
]
},
"eventType": "issue",
"eventNames": [
"issue_comment"
],
"actions": [
{
"name": "removeLabel",
"parameters": {
"label": "Needs-Triage"
}
},
{
"name": "addLabel",
"parameters": {
"label": "Loc-Sent To Team"
}
},
{
"name": "addReply",
"parameters": {
"comment": "Hi! Thanks for making us aware of the problem. We raised the issue with our internal localization team. This issue should be fixed hopefully in the next version of PowerToys."
}
}
],
"taskName": "Filed ADO item with Localization team"
}
}
],
"userGroups": []
}

214
.github/policies/resourceManagement.yml vendored Normal file
View File

@@ -0,0 +1,214 @@
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: 5
actions:
- closeIssue
- description:
frequencies:
- hourly:
hour: 6
filters:
- isIssue
- isOpen
- hasLabel:
label: Needs-Author-Feedback
- noActivitySince:
days: 5
- 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 **5 days**. It will be closed if no further activity occurs **within 5 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-Triage
- removeLabel:
label: Needs-Author-Feedback
- addLabel:
label: Needs-Team-Response
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 progress
description:
- if:
- payloadType: Issue_Comment
then:
- cleanEmailReply
description:
- if:
- payloadType: Issue_Comment
- commentContains:
pattern: '\/(bugreport|reportbug)'
isRegex: True
- or:
- activitySenderHasAssociation:
association: Member
- activitySenderHasAssociation:
association: Owner
- activitySenderHasAssociation:
association: Collaborator
then:
- removeLabel:
label: Needs-Triage
- addLabel:
label: Needs-Author-Feedback
- addReply:
reply: Hi there!<br/><br/>We need a bit more information to really debug this issue. Can you add a "Report Bug" zip file here? You right click on our system tray icon and just go to report bug. Then drag the zipfile from your desktop onto the GitHub comment box in this issue. Thanks! <br/>![Report Bug](https://user-images.githubusercontent.com/11349917/133042052-4975be21-4699-4363-83c9-a8e1869d079d.png)
- removeLabel:
label: Needs-Team-Response
description:
- if:
- payloadType: Issue_Comment
- commentContains:
pattern: '\/feedback[H|h]ub'
isRegex: True
- or:
- activitySenderHasAssociation:
association: Owner
- activitySenderHasAssociation:
association: Member
- activitySenderHasAssociation:
association: Collaborator
then:
- addReply:
reply: Hi! We've identified this issue that best is suited for Windows Feedback Hub. To do this on Windows, WinKey+F will bring it up!
- closeIssue
- removeLabel:
label: Needs-Triage
- removeLabel:
label: Needs-Team-Response
- addLabel:
label: Resolution-Please File on Feedback Hub
description:
- if:
- payloadType: Issue_Comment
- commentContains:
pattern: '\/dup(licate|e)?(\s+of)?\s+(\#[\d]+|https)'
isRegex: True
- or:
- activitySenderHasAssociation:
association: Owner
- activitySenderHasAssociation:
association: Member
- activitySenderHasAssociation:
association: Collaborator
then:
- addReply:
reply: Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
- closeIssue
- removeLabel:
label: Needs-Triage
- removeLabel:
label: Needs-Team-Response
- addLabel:
label: Resolution-Duplicate
description:
- if:
- payloadType: Issue_Comment
- commentContains:
pattern: '\/needinfo'
isRegex: True
- or:
- activitySenderHasAssociation:
association: Owner
- activitySenderHasAssociation:
association: Member
- activitySenderHasAssociation:
association: Collaborator
then:
- removeLabel:
label: Needs-Triage
- removeLabel:
label: Needs-Team-Response
- addLabel:
label: Needs-Author-Feedback
description:
- if:
- payloadType: Issue_Comment
- commentContains:
pattern: '\/loc\b'
isRegex: True
- or:
- activitySenderHasAssociation:
association: Owner
- activitySenderHasAssociation:
association: Member
then:
- removeLabel:
label: Needs-Triage
- addLabel:
label: Loc-Sent To Team
- addReply:
reply: Hi! Thanks for making us aware of the problem. We raised the issue with our internal localization team. This issue should be fixed hopefully in the next version of PowerToys.
description:
onFailure:
onSuccess: