Skip to content

Commit b2e5ef8

Browse files
committed
Add commit message to unrolled rollup table
1 parent 9f301d9 commit b2e5ef8

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

site/src/github.rs

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

0 commit comments

Comments
 (0)