Skip to content

Commit f72ed91

Browse files
committed
Improve commit message of pushes
1 parent 8d36d35 commit f72ed91

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

Cargo.lock

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ clap = { version = "4", features = ["derive"] }
1313
directories = "6"
1414
toml = "0.8"
1515
serde = { version = "1", features = ["derive"] }
16+
urlencoding = "2"
1617
which = "8"
1718

1819
[profile.release]

src/bin/rustc_josh_sync.rs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,19 @@ fn main() -> anyhow::Result<()> {
109109
.context("cannot perform push")?;
110110

111111
// Open PR with `subtree update` title to silence the `no-merges` triagebot check
112+
let merge_msg = format!(
113+
r#"Subtree update of https://github.com/{}.
114+
115+
Created using https://github.com/rust-lang/josh-sync.
116+
117+
r? @ghost"#,
118+
ctx.config.full_repo_name(),
119+
);
112120
println!(
113121
r#"You can create the rustc PR using the following URL:
114-
https://github.com/{UPSTREAM_REPO}/compare/{username}:{branch}?quick_pull=1&title={}+subtree+update&body=r?+@ghost"#,
115-
ctx.config.repo
122+
https://github.com/{UPSTREAM_REPO}/compare/{username}:{branch}?quick_pull=1&title={}+subtree+update&body={}"#,
123+
ctx.config.repo,
124+
urlencoding::encode(&merge_msg)
116125
);
117126
}
118127
}

0 commit comments

Comments
 (0)