This commit is contained in:
parent
c934d5f42e
commit
274a6d567b
1 changed files with 9 additions and 1 deletions
|
@ -85,13 +85,21 @@ pub async fn get_page(config: Config) -> String {
|
||||||
d.name = name.into_iter().collect();
|
d.name = name.into_iter().collect();
|
||||||
});
|
});
|
||||||
|
|
||||||
// Ascending order
|
// Ascending order by pulls IDs
|
||||||
data.iter_mut().for_each(|d| {
|
data.iter_mut().for_each(|d| {
|
||||||
d.pulls_closed.reverse();
|
d.pulls_closed.reverse();
|
||||||
d.pulls_merged.reverse();
|
d.pulls_merged.reverse();
|
||||||
d.pulls_open.reverse();
|
d.pulls_open.reverse();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Ascending order by number of pulls
|
||||||
|
data.sort_by(|a, b| {
|
||||||
|
b.pulls_merged
|
||||||
|
.len()
|
||||||
|
.partial_cmp(&a.pulls_merged.len())
|
||||||
|
.unwrap()
|
||||||
|
});
|
||||||
|
|
||||||
PortfolioTemplate {
|
PortfolioTemplate {
|
||||||
error: false,
|
error: false,
|
||||||
projects: Some(
|
projects: Some(
|
||||||
|
|
Loading…
Reference in a new issue