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