Skip to content

Commit ed1f9c2

Browse files
committed
Update agenda generator
Now shows new ACPs in correct order. Also shows 20 ACPs instead of 10.
1 parent 6f032ce commit ed1f9c2

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

tools/agenda-generator/src/generator.rs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,15 @@ impl Generator {
8282
.labels(&["api-change-proposal"])
8383
.repo("rust-lang/libs-team")
8484
.sort(Sort::Newest)
85-
.take(5)
85+
.take(10)
86+
.rev(true)
8687
.write(&mut self)?;
8788

8889
GithubQuery::new("stalled change proposal")
8990
.labels(&["api-change-proposal"])
9091
.repo("rust-lang/libs-team")
9192
.sort(Sort::LeastRecentlyUpdated)
92-
.take(5)
93+
.take(10)
9394
.skip(new_proposals.iter())
9495
.shuffle(true)
9596
.write(&mut self)?;
@@ -459,6 +460,7 @@ struct GithubQuery {
459460
count: Option<usize>,
460461
to_skip: Vec<String>,
461462
shuffle: bool,
463+
rev: bool,
462464
state: State,
463465
}
464466

@@ -498,6 +500,7 @@ impl GithubQuery {
498500
to_skip: vec![],
499501
count: None,
500502
shuffle: false,
503+
rev: false,
501504
state: State::Open,
502505
}
503506
}
@@ -537,6 +540,11 @@ impl GithubQuery {
537540
self
538541
}
539542

543+
fn rev(&mut self, rev: bool) -> &mut Self {
544+
self.rev = rev;
545+
self
546+
}
547+
540548
fn state(&mut self, state: State) -> &mut Self {
541549
self.state = state;
542550
self
@@ -606,6 +614,9 @@ impl GithubQuery {
606614
if let Some(count) = self.count {
607615
issues.truncate(count);
608616
}
617+
if self.rev {
618+
issues.reverse();
619+
}
609620
generator.write_issues(self.name, &issues)?;
610621
all_issues.append(&mut issues);
611622
}

0 commit comments

Comments
 (0)