diff --git a/pr_agent/tools/pr_description.py b/pr_agent/tools/pr_description.py index e6ddf839..67e6b2a7 100644 --- a/pr_agent/tools/pr_description.py +++ b/pr_agent/tools/pr_description.py @@ -177,7 +177,11 @@ class PRDescription: pr_types = self.data['PR Labels'] elif type(self.data['PR Labels']) == str: pr_types = self.data['PR Labels'].split(',') - + elif 'PR Type' in self.data: + if type(self.data['PR Type']) == list: + pr_types = self.data['PR Type'] + elif type(self.data['PR Type']) == str: + pr_types = self.data['PR Type'].split(',') return pr_types def _prepare_pr_answer_with_markers(self) -> Tuple[str, str]: @@ -223,6 +227,9 @@ class PRDescription: # Iterate over the dictionary items and append the key and value to 'markdown_text' in a markdown format markdown_text = "" + # Don't display 'PR Labels' + if 'PR Labels' in self.data: + self.data.pop('PR Labels') for key, value in self.data.items(): markdown_text += f"## {key}\n\n" markdown_text += f"{value}\n\n"