File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -163,10 +163,10 @@ async fn summarize_run(
163163 )
164164 . unwrap ( ) ;
165165
166- let next_steps = match source {
166+ let next_steps = match & source {
167167 PerfRunSource :: TryBuild => try_run_body ( is_regression, deserves_attention) ,
168168 PerfRunSource :: MasterCommit => master_run_body ( is_regression) ,
169- PerfRunSource :: TriageBuild ( _ ) => todo ! ( ) ,
169+ PerfRunSource :: TriageBuild ( triage_build ) => triage_run_body ( triage_build , is_regression ) ,
170170 } ;
171171 writeln ! ( & mut message, "{next_steps}\n " ) . unwrap ( ) ;
172172
@@ -372,3 +372,16 @@ Benchmarking means the PR may be perf-sensitive. \
372372@rustbot label: -S-waiting-on-perf {sign}perf-regression" ,
373373 )
374374}
375+
376+ fn triage_run_body ( build : & TriageBuild , is_regression : bool ) -> String {
377+ // The triage url deliberately not prefixed with "https://github.com/" as to not trigger the
378+ // "mentioned this pull request" github entry on the rollup
379+ format ! (
380+ "This PR was benchmarked as part of triage on the rollup it merged in: [triage URL](/rust-lang/rust/pull/{}#issuecomment-{})\
381+ \n \n \
382+ {}",
383+ build. rollup_pr_number,
384+ build. triage_comment. id,
385+ master_run_body( is_regression)
386+ )
387+ }
Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ use crate::request_handlers::parse_unrolled_build_message;
33use database:: QueuedCommit ;
44
55pub struct TriageBuild {
6- rollup_pr_number : u32 ,
7- triage_comment : ResponseComment ,
6+ pub rollup_pr_number : u32 ,
7+ pub triage_comment : ResponseComment ,
88}
99
1010pub const TRIAGE_MARKER : & str = "<!-- rust-timer: triage -->" ;
@@ -27,9 +27,7 @@ pub async fn is_triage_run(
2727 . get_comments ( unrolled_build. rollup_pr_number )
2828 . await ?;
2929 let Some ( triage_comment) = rollup_comments. into_iter ( ) . rev ( ) . find ( |c| {
30- c. author . login == "rust-timer"
31- && c. body . contains ( TRIAGE_MARKER )
32- && c. body . contains ( & commit. sha )
30+ c. viewer_did_author && c. body . contains ( TRIAGE_MARKER ) && c. body . contains ( & commit. sha )
3331 } ) else {
3432 // This was a try job on the unrolled build that did not originate from a triage command
3533 return Ok ( None ) ;
You can’t perform that action at this time.
0 commit comments