@@ -26,13 +26,12 @@ use database::Connection;
26
26
27
27
/// Enqueues try build artifacts and posts a message about them on the original rollup PR
28
28
pub async fn unroll_rollup (
29
- ci_client : client:: Client ,
30
- main_repo_client : client:: Client ,
29
+ gh_client : client:: Client ,
31
30
rollup_merges : impl Iterator < Item = & Commit > ,
32
31
previous_master : & str ,
33
32
rollup_pr_number : u32 ,
34
33
) -> Result < ( ) , String > {
35
- let commit_link = |sha : & str | format ! ( "https://github.com/rust-lang-ci /rust/commit/{sha}" ) ;
34
+ let commit_link = |sha : & str | format ! ( "https://github.com/rust-lang/rust/commit/{sha}" ) ;
36
35
37
36
let format_commit = |s : & str , truncate : bool | {
38
37
let display = truncate. then ( || s. split_at ( 10 ) . 0 ) . unwrap_or ( s) ;
@@ -42,7 +41,7 @@ pub async fn unroll_rollup(
42
41
// Sort rolled up commits by their PR number in ascending order, so that they have the
43
42
// same ordering as in the rollup PR description.
44
43
let mut unrolled_builds: Vec < UnrolledCommit > =
45
- enqueue_unrolled_try_builds ( ci_client , rollup_merges, previous_master) . await ?;
44
+ enqueue_unrolled_try_builds ( & gh_client , rollup_merges, previous_master) . await ?;
46
45
// The number should really be an integer, but if not, we will just sort the "non-integer" PRs
47
46
// first.
48
47
unrolled_builds. sort_by_cached_key ( |commit| commit. original_pr_number . parse :: < u64 > ( ) . ok ( ) ) ;
@@ -93,14 +92,14 @@ pub async fn unroll_rollup(
93
92
{mapping}\n \n *previous master*: {previous_master}\n \n In the case of a perf regression, \
94
93
run the following command for each PR you suspect might be the cause: `@rust-timer build $SHA`\n \
95
94
{COMMENT_MARK_ROLLUP}") ;
96
- main_repo_client . post_comment ( rollup_pr_number, msg) . await ;
95
+ gh_client . post_comment ( rollup_pr_number, msg) . await ;
97
96
Ok ( ( ) )
98
97
}
99
98
100
99
/// Enqueues try builds on the try-perf branch for every rollup merge in `rollup_merges`.
101
100
/// Returns a mapping between the rollup merge commit and the try build sha.
102
101
async fn enqueue_unrolled_try_builds < ' a > (
103
- client : client:: Client ,
102
+ client : & client:: Client ,
104
103
rollup_merges : impl Iterator < Item = & ' a Commit > ,
105
104
previous_master : & str ,
106
105
) -> Result < Vec < UnrolledCommit < ' a > > , String > {
@@ -236,14 +235,13 @@ pub async fn rollup_pr_number(
236
235
237
236
pub async fn enqueue_shas (
238
237
ctxt : & SiteCtxt ,
239
- main_client : & client:: Client ,
240
- ci_client : & client:: Client ,
238
+ gh_client : & client:: Client ,
241
239
pr_number : u32 ,
242
240
commits : impl Iterator < Item = & str > ,
243
241
) -> Result < ( ) , String > {
244
242
let mut msg = String :: new ( ) ;
245
243
for commit in commits {
246
- let mut commit_response = ci_client
244
+ let mut commit_response = gh_client
247
245
. get_commit ( commit)
248
246
. await
249
247
. map_err ( |e| e. to_string ( ) ) ?;
@@ -299,7 +297,7 @@ It will probably take at least ~{:.1} hours until the benchmark run finishes."#,
299
297
300
298
if !msg. is_empty ( ) {
301
299
msg. push_str ( & format ! ( "\n {COMMENT_MARK_TEMPORARY}" ) ) ;
302
- main_client . post_comment ( pr_number, msg) . await ;
300
+ gh_client . post_comment ( pr_number, msg) . await ;
303
301
}
304
302
305
303
Ok ( ( ) )
0 commit comments