Skip to content

Commit aa540b7

Browse files
committed
Add commit message to unrolled rollup table
1 parent 0652696 commit aa540b7

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

site/src/github.rs

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,32 @@ pub async fn unroll_rollup(
5454
let head = format_commit(&c.rolled_up_head, true);
5555
format!("❌ conflicts merging '{head}' into previous master ❌")
5656
});
57-
writeln!(&mut string, "|#{pr}|{commit}|", pr = c.original_pr_number).unwrap();
57+
let message = c
58+
.rollup_merge
59+
.message
60+
.split('\n')
61+
// Skip over "Rollup merge of ..." and an empty line
62+
.nth(2)
63+
.map(|m| {
64+
if m.len() <= 60 {
65+
m.to_string()
66+
} else {
67+
format!("{}…", m.split_at(59).0)
68+
}
69+
})
70+
.unwrap_or_else(|| format!("#{}", c.original_pr_number));
71+
writeln!(
72+
&mut string,
73+
"|#{pr}|{message}|{commit}|",
74+
pr = c.original_pr_number
75+
)
76+
.unwrap();
5877
string
5978
});
6079
let previous_master = format_commit(previous_master, true);
6180
let msg =
6281
format!("📌 Perf builds for each rolled up PR:\n\n\
63-
|PR# | Perf Build Sha|\n|----|:-----:|\n\
82+
|PR# | Message | Perf Build Sha|\n|----|:-----:|\n\
6483
{mapping}\n\n*previous master*: {previous_master}\n\nIn the case of a perf regression, \
6584
run the following command for each PR you suspect might be the cause: `@rust-timer build $SHA`\n\
6685
{COMMENT_MARK_ROLLUP}");

0 commit comments

Comments
 (0)