forked from PowerShell/PowerShell
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPRManagement.yml
More file actions
226 lines (211 loc) · 6.06 KB
/
PRManagement.yml
File metadata and controls
226 lines (211 loc) · 6.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
id: PRManagement
name: GitOps.PullRequestIssueManagement
description: Collection of PR bot triaging behaviors
owner:
resource: repository
disabled: false
where:
configuration:
resourceManagementConfiguration:
scheduledSearches:
- description: If Stale label and waiting on author and no activity since 10 days then close the PR
frequencies:
- hourly:
hour: 12
filters:
- isPullRequest
- isOpen
- hasLabel:
label: Waiting on Author
- hasLabel:
label: Stale
- noActivitySince:
days: 10
actions:
- closeIssue
- description: If PR has Waiting on Author label and no activity in 15 days label as stale.
frequencies:
- hourly:
hour: 3
filters:
- isPullRequest
- isOpen
- hasLabel:
label: Waiting on Author
- noActivitySince:
days: 15
- isNotLabeledWith:
label: Stale
actions:
- addLabel:
label: Stale
- addReply:
reply: This pull request has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **15 days**. It will be closed if no further activity occurs **within 10 days of this comment**.
- description: Label Review - Needed if PR is opened an no activity in 7 days but no other labels on it
frequencies:
- hourly:
hour: 12
filters:
- isPullRequest
- isOpen
- isNotLabeledWith:
label: Waiting on Author
- noActivitySince:
days: 7
- isNotLabeledWith:
label: Stale
- isNotLabeledWith:
label: Review - Needed
- isNotLabeledWith:
label: Review - Committee
- isNotDraftPullRequest
actions:
- addLabel:
label: Review - Needed
- addReply:
reply: >-
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for **7 days**.
Maintainer, please provide feedback and/or mark it as `Waiting on Author`
- description: Add waiting on Author label if is draft PR, if no activity label
frequencies:
- hourly:
hour: 12
filters:
- isOpen
- isDraftPullRequest
- isNotLabeledWith:
label: Review - Committee
- isNotLabeledWith:
label: Waiting on Author
- isNotLabeledWith:
label: Stale
- noActivitySince:
days: 3
actions:
- addLabel:
label: Waiting on Author
eventResponderTasks:
- description: If PR has AutoMerge Label then enable Automerge to squash
if:
- payloadType: Pull_Request
- hasLabel:
label: AutoMerge
then:
- enableAutoMerge:
mergeMethod: Squash
- description: If PR has label AutoMerge Removed then disable Automerge
if:
- payloadType: Pull_Request
- labelRemoved:
label: AutoMerge
then:
- disableAutoMerge
- description: If PR review requests changes then add label waiting on Author and remove review needed
if:
- payloadType: Pull_Request_Review
- isAction:
action: Submitted
- isReviewState:
reviewState: Changes_requested
then:
- addLabel:
label: Waiting on Author
- removeLabel:
label: Review - Needed
- description: Remove Waiting on author if has label and activity from author
if:
- payloadType: Pull_Request
- isActivitySender:
issueAuthor: True
- not:
isAction:
action: Closed
- hasLabel:
label: Waiting on Author
- not:
titleContains:
pattern: "(WIP|Work in progress|\U0001F6A7)"
isRegex: True
then:
- removeLabel:
label: Waiting on Author
- description: remove waiting on author if review by author and has waiting on author
if:
- payloadType: Pull_Request_Review
- isActivitySender:
issueAuthor: True
- hasLabel:
label: Waiting on Author
then:
- removeLabel:
label: Waiting on Author
- description: Remove Stale label if PR has activity from author which is not closure
if:
- payloadType: Pull_Request
- not:
isAction:
action: Closed
- hasLabel:
label: Stale
- isActivitySender:
issueAuthor: True
then:
- removeLabel:
label: Stale
- description: Remove Stale label if PR is reviewed
if:
- payloadType: Pull_Request_Review
- hasLabel:
label: Stale
then:
- removeLabel:
label: Stale
- description: Remove Review Needed if PR is created or done any action by Admins and iSazonov
if:
- payloadType: Pull_Request
- hasLabel:
label: Review - Needed
- or:
- isAction:
action: Null
- isAction:
action: Closed
- isAction:
action: Reopened
- isAction:
action: Assigned
- isAction:
action: Unassigned
- isAction:
action: Unlabeled
- or:
- activitySenderHasPermission:
permission: Admin
- isActivitySender:
user: iSazonov
issueAuthor: False
then:
- removeLabel:
label: Review - Needed
- description: Remove Review - Needed if issue comment is by admin or iSazonov
if:
- payloadType: Issue_Comment
- hasLabel:
label: Review - Needed
- or:
- activitySenderHasPermission:
permission: Admin
- isActivitySender:
user: iSazonov
issueAuthor: False
then:
- removeLabel:
label: Review - Needed
- description: If inPRLabel then label in PR
if:
- payloadType: Pull_Request
then:
- inPrLabel:
label: In-PR
onFailure:
onSuccess: