Skip to content

Commit e190d43

Browse files
committed
Only post 'waiting-on-perf' label changes when its a try run
1 parent dfffe9a commit e190d43

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

site/src/github.rs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -562,17 +562,24 @@ async fn post_comparison_comment(ctxt: &SiteCtxt, commit: QueuedCommit, is_maste
562562
);
563563
let (summary, direction) =
564564
categorize_benchmark(commit.sha.clone(), commit.parent_sha, ctxt).await;
565-
let label = match direction {
565+
566+
let mut label = String::new();
567+
if !is_master_commit {
568+
label.push_str("+S-waiting-on-review -S-waiting-on-perf ");
569+
};
570+
label.push_str(match direction {
566571
Some(Direction::Regression | Direction::Mixed) => "+perf-regression",
567572
Some(Direction::Improvement) | None => "-perf-regression",
568-
};
573+
});
574+
569575
let rollup_msg = if is_master_commit {
570576
""
571577
} else {
572578
"Benchmarking this pull request likely means that it is \
573579
perf-sensitive, so we're automatically marking it as not fit \
574580
for rolling up. "
575581
};
582+
576583
let next_steps_msg = direction
577584
.map(|d| {
578585
format!(
@@ -602,6 +609,7 @@ for rolling up. "
602609
} else {
603610
"@bors rollup=never\n"
604611
};
612+
605613
post_comment(
606614
&ctxt.config,
607615
commit.pr,
@@ -612,7 +620,7 @@ for rolling up. "
612620
613621
{rollup}{next_steps}
614622
{bors}
615-
@rustbot label: +S-waiting-on-review -S-waiting-on-perf {label}",
623+
@rustbot label: {label}",
616624
sha = commit.sha,
617625
url = comparison_url,
618626
summary = summary,

0 commit comments

Comments
 (0)