File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
tools/agenda-generator/src Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 1
1
use anyhow:: Result ;
2
- use chrono:: NaiveDateTime ;
2
+ use chrono:: { Duration , NaiveDateTime } ;
3
3
use itertools:: Itertools ;
4
4
use reqwest:: header:: { AUTHORIZATION , USER_AGENT } ;
5
5
use serde:: de:: { DeserializeOwned , Deserializer } ;
@@ -207,6 +207,14 @@ impl Generator {
207
207
let mut fcps: Vec < FcpWithInfo > =
208
208
reqwest:: blocking:: get ( "https://rfcbot.rs/api/all" ) ?. json ( ) ?;
209
209
fcps. retain ( |fcp| fcp. issue . labels . contains ( & label) ) ;
210
+ let waiting_on_author = "S-waiting-on-author" . to_string ( ) ;
211
+ fcps. retain ( |fcp| !fcp. issue . labels . contains ( & waiting_on_author) ) ;
212
+ let now = chrono:: Utc :: now ( ) . naive_utc ( ) ;
213
+ fcps. retain ( |fcp| {
214
+ let created = fcp. status_comment . created_at ;
215
+ let updated = fcp. status_comment . updated_at ;
216
+ ( now - created) > Duration :: weeks ( 4 ) && ( now - updated) > Duration :: days ( 5 )
217
+ } ) ;
210
218
211
219
let reviewer_count = fcps
212
220
. iter ( )
@@ -220,7 +228,6 @@ impl Generator {
220
228
. map ( |fcp| fcp. issue . repository . as_str ( ) )
221
229
. collect :: < BTreeSet < _ > > ( ) ;
222
230
223
-
224
231
writeln ! ( self . agenda, "### FCPs" ) ?;
225
232
writeln ! ( self . agenda, ) ?;
226
233
writeln ! ( self . agenda, "{} open T-libs-api FCPs:" , fcps. len( ) ) ?;
You can’t perform that action at this time.
0 commit comments