Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions scripts/auto_release/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,12 @@ def check_file(self):
def sdk_code_path(self) -> str:
return str(Path(f'sdk/{self.sdk_folder}/azure-mgmt-{self.package_name}'))

@property
def is_single_path(self) -> bool:
path = str(Path(f'sdk/{self.sdk_folder}'))
num = sum([os.path.isdir(str(Path(f'{path}/{listx}'))) for listx in os.listdir(path)])
return num == 1

@return_origin_path
def install_package_locally(self):
os.chdir(self.sdk_code_path())
Expand Down Expand Up @@ -454,6 +460,8 @@ def create_pr_proc(self):
pr_head = "{}:{}".format(os.getenv('USR_NAME'), self.new_branch)
pr_base = 'main'
pr_body = "{} \n{} \n{}".format(self.issue_link, self.test_result, self.pipeline_link)
if not self.is_single_path:
pr_body += f'\nBuildTargetingString\n azure-mgmt-{self.package_name}\nSkip.CreateApiReview\ntrue'
res_create = api.pulls.create(pr_title, pr_head, pr_base, pr_body)

# Add issue link on PR
Expand Down