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 11use anyhow:: Result ;
2- use chrono:: NaiveDateTime ;
2+ use chrono:: { Duration , NaiveDateTime } ;
33use itertools:: Itertools ;
44use reqwest:: header:: { AUTHORIZATION , USER_AGENT } ;
55use serde:: de:: { DeserializeOwned , Deserializer } ;
@@ -207,6 +207,14 @@ impl Generator {
207207 let mut fcps: Vec < FcpWithInfo > =
208208 reqwest:: blocking:: get ( "https://rfcbot.rs/api/all" ) ?. json ( ) ?;
209209 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+ } ) ;
210218
211219 let reviewer_count = fcps
212220 . iter ( )
@@ -220,7 +228,6 @@ impl Generator {
220228 . map ( |fcp| fcp. issue . repository . as_str ( ) )
221229 . collect :: < BTreeSet < _ > > ( ) ;
222230
223-
224231 writeln ! ( self . agenda, "### FCPs" ) ?;
225232 writeln ! ( self . agenda, ) ?;
226233 writeln ! ( self . agenda, "{} open T-libs-api FCPs:" , fcps. len( ) ) ?;
You can’t perform that action at this time.
0 commit comments