@@ -4,7 +4,7 @@ use rustc_josh_sync::SyncContext;
4
4
use rustc_josh_sync:: config:: { JoshConfig , load_config} ;
5
5
use rustc_josh_sync:: josh:: { JoshProxy , try_install_josh} ;
6
6
use 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} ;
8
8
use std:: path:: { Path , PathBuf } ;
9
9
10
10
const DEFAULT_CONFIG_PATH : & str = "josh-sync.toml" ;
@@ -109,18 +109,23 @@ fn main() -> anyhow::Result<()> {
109
109
. context ( "cannot perform push" ) ?;
110
110
111
111
// 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
+
112
115
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 }.
114
117
115
118
Created using https://github.com/rust-lang/josh-sync.
116
119
117
120
r? @ghost"# ,
118
- ctx. config. full_repo_name( ) ,
121
+ repo = ctx. config. repo,
122
+ full_repo = ctx. config. full_repo_name( ) ,
119
123
) ;
124
+
120
125
println ! (
121
126
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 ) ,
124
129
urlencoding:: encode( & merge_msg)
125
130
) ;
126
131
}
0 commit comments