Skip to content

Commit 676ba90

Browse files
authored
Merge pull request #573 from Urgau/canonicalise-issue-links
Canonicalize issue links in rollup PR body
2 parents c3e75c4 + b9ac6e2 commit 676ba90

1 file changed

Lines changed: 27 additions & 17 deletions

File tree

src/github/rollup.rs

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -327,13 +327,23 @@ async fn create_rollup(
327327

328328
let mut body = "Successful merges:\n\n".to_string();
329329
for pr in &successes {
330-
body.push_str(&format!(" - #{} ({})\n", pr.number.0, pr.title));
330+
body.push_str(&format!(
331+
" - {}#{} ({})\n",
332+
gh_client.repository(),
333+
pr.number.0,
334+
pr.title
335+
));
331336
}
332337

333338
if !failures.is_empty() {
334339
body.push_str("\nFailed merges:\n\n");
335340
for pr in &failures {
336-
body.push_str(&format!(" - #{} ({})\n", pr.number.0, pr.title));
341+
body.push_str(&format!(
342+
" - {}#{} ({})\n",
343+
gh_client.repository(),
344+
pr.number.0,
345+
pr.title
346+
));
337347
}
338348
}
339349
body.push_str("\nr? @ghost");
@@ -506,13 +516,13 @@ mod tests {
506516
insta::assert_snapshot!(repo.lock().get_pr(6).description, @"
507517
Successful merges:
508518
509-
- #2 (Title of PR 2)
510-
- #3 (Title of PR 3)
511-
- #5 (Title of PR 5)
519+
- rust-lang/borstest#2 (Title of PR 2)
520+
- rust-lang/borstest#3 (Title of PR 3)
521+
- rust-lang/borstest#5 (Title of PR 5)
512522
513523
Failed merges:
514524
515-
- #4 (Title of PR 4)
525+
- rust-lang/borstest#4 (Title of PR 4)
516526
517527
r? @ghost
518528
@@ -547,12 +557,12 @@ mod tests {
547557
insta::assert_snapshot!(repo.lock().get_pr(5).description, @"
548558
Successful merges:
549559
550-
- #2 (Title of PR 2)
551-
- #4 (Title of PR 4)
560+
- rust-lang/borstest#2 (Title of PR 2)
561+
- rust-lang/borstest#4 (Title of PR 4)
552562
553563
Failed merges:
554564
555-
- #3 (Title of PR 3)
565+
- rust-lang/borstest#3 (Title of PR 3)
556566
557567
r? @ghost
558568
@@ -585,8 +595,8 @@ mod tests {
585595
insta::assert_snapshot!(repo.lock().get_pr(4).description, @"
586596
Successful merges:
587597
588-
- #2 (Title of PR 2)
589-
- #3 (Title of PR 3)
598+
- rust-lang/borstest#2 (Title of PR 2)
599+
- rust-lang/borstest#3 (Title of PR 3)
590600
591601
r? @ghost
592602
@@ -623,10 +633,10 @@ mod tests {
623633
insta::assert_snapshot!(repo.lock().get_pr(6).description, @"
624634
Successful merges:
625635
626-
- #3 (Title of PR 3)
627-
- #4 (Title of PR 4)
628-
- #2 (Title of PR 2)
629-
- #5 (Title of PR 5)
636+
- rust-lang/borstest#3 (Title of PR 3)
637+
- rust-lang/borstest#4 (Title of PR 4)
638+
- rust-lang/borstest#2 (Title of PR 2)
639+
- rust-lang/borstest#5 (Title of PR 5)
630640
631641
r? @ghost
632642
@@ -654,8 +664,8 @@ mod tests {
654664
insta::assert_snapshot!(repo.lock().get_pr(4).description, @"
655665
Successful merges:
656666
657-
- #2 (Title of PR 2)
658-
- #3 (Title of PR 3)
667+
- rust-lang/borstest#2 (Title of PR 2)
668+
- rust-lang/borstest#3 (Title of PR 3)
659669
660670
r? @ghost
661671

0 commit comments

Comments
 (0)