File tree 1 file changed +13
-2
lines changed
1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -33,8 +33,19 @@ pub async fn unroll_rollup(
33
33
let display = truncate. then ( || s. split_at ( 10 ) . 0 ) . unwrap_or ( s) ;
34
34
format ! ( "[{display}](https://github.com/rust-lang-ci/rust/commit/{s})" )
35
35
} ;
36
- let mapping = enqueue_unrolled_try_builds ( ci_client, rollup_merges, previous_master)
37
- . await ?
36
+
37
+ // Sort rolled up commits by their PR number in ascending order, so that they have the
38
+ // same ordering as in the rollup PR description.
39
+ let mut unrolled_builds: Vec < UnrolledCommit > =
40
+ enqueue_unrolled_try_builds ( ci_client, rollup_merges, previous_master) . await ?;
41
+ unrolled_builds. sort_unstable_by ( |a, b| {
42
+ a. original_pr_number
43
+ . parse :: < u64 > ( )
44
+ . and_then ( |a| b. original_pr_number . parse :: < u64 > ( ) . map ( |b| a. cmp ( & b) ) )
45
+ . unwrap_or_else ( |_| a. original_pr_number . cmp ( b. original_pr_number ) )
46
+ } ) ;
47
+
48
+ let mapping = unrolled_builds
38
49
. into_iter ( )
39
50
. fold ( String :: new ( ) , |mut string, c| {
40
51
use std:: fmt:: Write ;
You can’t perform that action at this time.
0 commit comments