Skip to content

Commit f36206f

Browse files
authored
Update GitHub ResourceManagement policy yml (#4418)
1 parent 8b6c0f8 commit f36206f

File tree

1 file changed

+118
-96
lines changed

1 file changed

+118
-96
lines changed

.github/policies/resourceManagement.yml

Lines changed: 118 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -8,40 +8,42 @@ where:
88
configuration:
99
resourceManagementConfiguration:
1010
scheduledSearches:
11-
- description:
11+
- description: Close needs-author-feedback issue with no-recent-activity after 7 days
1212
frequencies:
1313
- hourly:
1414
hour: 6
1515
filters:
1616
- isIssue
1717
- isOpen
1818
- hasLabel:
19-
label: needs-author feedback
19+
label: needs-author-feedback
2020
- hasLabel:
21-
label: status-no recent activity
21+
label: no-recent-activity
2222
- noActivitySince:
23-
days: 10
23+
days: 7
2424
actions:
2525
- closeIssue
26-
- description:
26+
27+
- description: Add no-recent-activity to issue with needs-author-feedback after 7 days
2728
frequencies:
2829
- hourly:
2930
hour: 6
3031
filters:
3132
- isIssue
3233
- isOpen
3334
- hasLabel:
34-
label: needs-author feedback
35+
label: needs-author-feedback
3536
- noActivitySince:
36-
days: 10
37+
days: 7
3738
- isNotLabeledWith:
38-
label: status-no recent activity
39+
label: no-recent-activity
3940
actions:
4041
- addLabel:
41-
label: status-no recent activity
42+
label: no-recent-activity
4243
- addReply:
43-
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**.
44-
- description:
44+
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 **7 days**. It will be closed if no further activity occurs **within 7 days of this comment**.
45+
46+
- description: Close duplicates after 3 days
4547
frequencies:
4648
- hourly:
4749
hour: 6
@@ -56,105 +58,92 @@ configuration:
5658
- addReply:
5759
reply: This issue has been marked as duplicate and has not had any activity for **3 days**. It will be closed for housekeeping purposes.
5860
- closeIssue
59-
- description:
60-
frequencies: []
61-
filters:
62-
- isOpen
63-
- isIssue
64-
- noActivitySince:
65-
days: 14
66-
- isNotLabeledWith:
67-
label: feature proposal
68-
- isNotLabeledWith:
69-
label: discussion
70-
- isNotLabeledWith:
71-
label: status-no recent activity
72-
- isNotLabeledWith:
73-
label: needs-author-feedback
74-
- isNotLabeledWith:
75-
label: 'needs-triage :mag:'
76-
actions:
77-
- addLabel:
78-
label: 'needs-attention :wave:'
61+
62+
7963
eventResponderTasks:
80-
- if:
64+
65+
- description: working on it
66+
if:
67+
- payloadType: Pull_Request
68+
then:
69+
- inPrLabel:
70+
label: 'Status: In PR'
71+
72+
73+
- description: Add needs-triage to new or reopened Issue
74+
if:
8175
- payloadType: Issues
8276
- or:
77+
- isAction:
78+
action: Opened
8379
- isAction:
8480
action: Reopened
85-
- and:
86-
- isAction:
87-
action: Opened
88-
- not: isLabeled
81+
then:
82+
- addLabel:
83+
label: needs-triage
84+
85+
86+
- description: Remove needs-triage from Closed items
87+
if:
88+
- payloadType: Issues
89+
- isAction:
90+
action: Closed
91+
then:
92+
- removeLabel:
93+
label: needs-triage
94+
95+
96+
description: Add needs-triage to closed item if commented on by external user
97+
- if:
98+
- payloadType: Issue_Comment
99+
- not: isOpen
100+
- not:
101+
or:
89102
- activitySenderHasPermission:
90103
permission: Write
104+
- activitySenderHasPermission:
105+
permission: Admin
91106
then:
92107
- addLabel:
93-
label: 'needs-triage :mag:'
94-
description:
95-
- if:
108+
label: needs-triage
109+
110+
111+
- description: Remove needs-author-feedback after comment from author and add needs-assignee-attention (if issue is assigned)
112+
if:
96113
- payloadType: Issue_Comment
97114
- isAction:
98115
action: Created
99116
- isActivitySender:
100117
issueAuthor: True
101118
- hasLabel:
102-
label: needs-author feedback
103-
- isOpen
119+
label: needs-author-feedback
120+
- isAssignedToSomeone
104121
then:
105122
- addLabel:
106-
label: 'needs-attention :wave:'
107-
- removeLabel:
108-
label: needs-author feedback
109-
description:
110-
- if:
111-
- payloadType: Issues
112-
- not:
113-
isAction:
114-
action: Closed
115-
- hasLabel:
116-
label: status-no recent activity
117-
then:
123+
label: needs-assignee-attention
118124
- removeLabel:
119-
label: status-no recent activity
120-
description:
121-
- if:
125+
label: needs-author-feedback
126+
127+
128+
- description: Remove needs-author-feedback after comment from author and add needs-triage (if issue is unassigned)
129+
if:
122130
- payloadType: Issue_Comment
123-
- hasLabel:
124-
label: status-no recent activity
125-
then:
126-
- removeLabel:
127-
label: status-no recent activity
128-
description:
129-
- if:
130-
- payloadType: Pull_Request
131-
then:
132-
- inPrLabel:
133-
label: 'Status: In PR'
134-
description:
135-
- if:
136-
- payloadType: Issues
137131
- isAction:
138-
action: Closed
139-
then:
140-
- removeLabel:
141-
label: 'needs-triage :mag:'
142-
description:
143-
- if:
144-
- payloadType: Issue_Comment
145-
- not: isOpen
132+
action: Created
133+
- isActivitySender:
134+
issueAuthor: True
146135
- hasLabel:
147-
label: 'needs-triage :mag:'
148-
- or:
149-
- activitySenderHasPermission:
150-
permission: Write
151-
- activitySenderHasPermission:
152-
permission: Admin
136+
label: needs-author-feedback
137+
- not: isAssignedToSomeone
153138
then:
139+
- addLabel:
140+
label: needs-triage
154141
- removeLabel:
155-
label: 'needs-triage :mag:'
156-
description:
157-
- if:
142+
label: needs-author-feedback
143+
144+
145+
- description: Add needs-triage to new PR
146+
if:
158147
- payloadType: Pull_Request
159148
- or:
160149
- isAction:
@@ -163,16 +152,49 @@ configuration:
163152
action: Reopened
164153
then:
165154
- addLabel:
166-
label: 'needs-triage :mag:'
167-
description:
168-
- if:
155+
label: needs-triage
156+
157+
158+
- description: Remove needs-author-feedback after comment from author and add needs-triage
159+
if:
160+
- payloadType: Issue_Comment
161+
- isAction:
162+
action: Created
163+
- isActivitySender:
164+
issueAuthor: True
165+
- hasLabel:
166+
label: needs-author-feedback
167+
- isOpen
168+
then:
169+
- addLabel:
170+
label: needs-triage
171+
- removeLabel:
172+
label: needs-author-feedback
173+
174+
175+
- description: Remove no-recent-activity from issue
176+
if:
169177
- payloadType: Issues
178+
- not:
179+
isAction:
180+
action: Closed
170181
- hasLabel:
171-
label: feature proposal
172-
- and:
173-
- isAction:
174-
action: Opened
175-
then: []
176-
description:
182+
label: no-recent-activity
183+
then:
184+
- removeLabel:
185+
label: no-recent-activity
186+
187+
188+
- description: Remove no-recent-activity from issue after comment
189+
if:
190+
- payloadType: Issue_Comment
191+
- hasLabel:
192+
label: no-recent-activity
193+
then:
194+
- removeLabel:
195+
label: no-recent-activity
196+
197+
198+
177199
onFailure:
178200
onSuccess:

0 commit comments

Comments
 (0)