diff --git a/README.md b/README.md index d2c4e171..19747071 100644 --- a/README.md +++ b/README.md @@ -78,12 +78,12 @@ CodiumAI `PR-Agent` is an open-source tool aiming to help developers review pull | | | GitHub | Gitlab | Bitbucket | |-------|---------------------------------------------|:------:|:------:|:---------:| | TOOLS | Review | :white_check_mark: | :white_check_mark: | :white_check_mark: | -| | ⮑ Inline review | :white_check_mark: | :white_check_mark: | | +| | ⮑ Inline review | :white_check_mark: | :white_check_mark: | :white_check_mark: | | Ask | :white_check_mark: | :white_check_mark: | :white_check_mark: -| | Auto-Description | :white_check_mark: | :white_check_mark: | | -| | Improve Code | :white_check_mark: | :white_check_mark: | | +| | Auto-Description | :white_check_mark: | :white_check_mark: | :white_check_mark: +| | Improve Code | :white_check_mark: | :white_check_mark: | :white_check_mark: | | Reflect and Review | :white_check_mark: | | | -| | Update CHANGELOG.md | :white_check_mark: | | | +| | Update CHANGELOG.md | :white_check_mark: | | :white_check_mark: | | | | | | | USAGE | CLI | :white_check_mark: | :white_check_mark: | :white_check_mark: | | | App / webhook | :white_check_mark: | :white_check_mark: | | diff --git a/pr_agent/git_providers/bitbucket_provider.py b/pr_agent/git_providers/bitbucket_provider.py index b1c49b1e..62b5a0c9 100644 --- a/pr_agent/git_providers/bitbucket_provider.py +++ b/pr_agent/git_providers/bitbucket_provider.py @@ -225,3 +225,7 @@ class BitbucketProvider: def get_commit_messages(self): return "" # not implemented yet + + # bitbucket does not support labels + def publish_description(self, pr_title: str, pr_body: str): + return "" diff --git a/pr_agent/tools/pr_description.py b/pr_agent/tools/pr_description.py index 79ad19e2..9ed81c20 100644 --- a/pr_agent/tools/pr_description.py +++ b/pr_agent/tools/pr_description.py @@ -73,12 +73,16 @@ class PRDescription: if get_settings().pr_description.publish_description_as_comment: self.git_provider.publish_comment(pr_body) 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) + # bitbucket does not support publishing PR labels yet + if get_settings().config.git_provider == 'bitbucket': + 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.remove_initial_comment() return ""