File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -298,6 +298,14 @@ fn build_url_to_api(build_url: &str) -> Result<String, ClientError> {
298298 }
299299}
300300
301+ fn build_url_to_manager ( build_url : & str ) -> Result < String , ClientError > {
302+ let api_base = build_url_to_api ( build_url) ?;
303+ Ok ( api_base
304+ . trim_end_matches ( "/api/v1" )
305+ . trim_end_matches ( '/' )
306+ . to_string ( ) )
307+ }
308+
301309fn publish_current_state ( body : & Value ) -> Option < String > {
302310 if let Some ( state) = body. get ( "current-state" ) . and_then ( Value :: as_str) {
303311 return Some ( state. to_string ( ) ) ;
@@ -982,7 +990,7 @@ impl ApiClient {
982990 ref_pairs. sort_by ( |( left_name, _) , ( right_name, _) | left_name. cmp ( right_name) ) ;
983991
984992 let minimal_upload_client = if args. minimal_token {
985- let manager_url = build_url_to_api ( & args. build_url ) ?;
993+ let manager_url = build_url_to_manager ( & args. build_url ) ?;
986994 let build_id = args
987995 . build_url
988996 . trim_end_matches ( '/' )
You can’t perform that action at this time.
0 commit comments