File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -410,6 +410,12 @@ def check_file(self):
410410 def sdk_code_path (self ) -> str :
411411 return str (Path (f'sdk/{ self .sdk_folder } /azure-mgmt-{ self .package_name } ' ))
412412
413+ @property
414+ def is_single_path (self ) -> bool :
415+ path = str (Path (f'sdk/{ self .sdk_folder } ' ))
416+ num = sum ([os .path .isdir (str (Path (f'{ path } /{ listx } ' ))) for listx in os .listdir (path )])
417+ return num == 1
418+
413419 @return_origin_path
414420 def install_package_locally (self ):
415421 os .chdir (self .sdk_code_path ())
@@ -454,6 +460,8 @@ def create_pr_proc(self):
454460 pr_head = "{}:{}" .format (os .getenv ('USR_NAME' ), self .new_branch )
455461 pr_base = 'main'
456462 pr_body = "{} \n {} \n {}" .format (self .issue_link , self .test_result , self .pipeline_link )
463+ if not self .is_single_path :
464+ pr_body += f'\n BuildTargetingString\n azure-mgmt-{ self .package_name } \n Skip.CreateApiReview\n true'
457465 res_create = api .pulls .create (pr_title , pr_head , pr_base , pr_body )
458466
459467 # Add issue link on PR
You can’t perform that action at this time.
0 commit comments