@@ -4,7 +4,7 @@ use rustc_josh_sync::SyncContext;
44use rustc_josh_sync:: config:: { JoshConfig , load_config} ;
55use rustc_josh_sync:: josh:: { JoshProxy , try_install_josh} ;
66use rustc_josh_sync:: sync:: { GitSync , RustcPullError , UPSTREAM_REPO } ;
7- use rustc_josh_sync:: utils:: prompt;
7+ use rustc_josh_sync:: utils:: { get_current_head_sha , prompt} ;
88use std:: path:: { Path , PathBuf } ;
99
1010const DEFAULT_CONFIG_PATH : & str = "josh-sync.toml" ;
@@ -109,18 +109,23 @@ 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 title = format ! ( "{} subtree update" , ctx. config. repo) ;
113+ let head = get_current_head_sha ( ) ?;
114+
112115 let merge_msg = format ! (
113- r#"Subtree update of https://github.com/{}.
116+ r#"Subtree update of `{repo}` to https://github.com/{full_repo}/commit/{head }.
114117
115118Created using https://github.com/rust-lang/josh-sync.
116119
117120r? @ghost"# ,
118- ctx. config. full_repo_name( ) ,
121+ repo = ctx. config. repo,
122+ full_repo = ctx. config. full_repo_name( ) ,
119123 ) ;
124+
120125 println ! (
121126 r#"You can create the rustc PR using the following URL:
122- https://github.com/{UPSTREAM_REPO}/compare/{username}:{branch}?quick_pull=1&title={}+subtree+update &body={}"# ,
123- ctx . config . repo ,
127+ https://github.com/{UPSTREAM_REPO}/compare/{username}:{branch}?quick_pull=1&title={}&body={}"# ,
128+ urlencoding :: encode ( & title ) ,
124129 urlencoding:: encode( & merge_msg)
125130 ) ;
126131 }
0 commit comments