Remove 'bitbucket' explicit dependency anywhere that's not in bitbucket_provider.py

This commit is contained in:
Ori Kotek
2023-09-10 14:06:13 +03:00
parent adb9964823
commit 115b513c9b
11 changed files with 38 additions and 32 deletions

View File

@ -75,17 +75,12 @@ class PRDescription:
if get_settings().pr_description.publish_description_as_comment:
self.git_provider.publish_comment(pr_body)
else:
# bitbucket does not support publishing PR labels yet
if get_settings().config.git_provider == 'bitbucket':
self.git_provider.publish_description(pr_title, description)
return
else:
self.git_provider.publish_description(pr_title, pr_body)
if self.git_provider.is_supported("get_labels"):
current_labels = self.git_provider.get_labels()
if current_labels is None:
current_labels = []
self.git_provider.publish_labels(pr_types + current_labels)
self.git_provider.publish_description(pr_title, pr_body)
if self.git_provider.is_supported("get_labels"):
current_labels = self.git_provider.get_labels()
if current_labels is None:
current_labels = []
self.git_provider.publish_labels(pr_types + current_labels)
self.git_provider.remove_initial_comment()
return ""