Merge commit 'e878bbbe369c90433c1b261b5479d23c47734539' into hl/test_docstring

This commit is contained in:
Hussam.lawen
2023-11-15 10:37:31 +02:00

View File

@ -107,7 +107,7 @@ class GitProvider(ABC):
def get_user_description(self) -> str:
description = (self.get_pr_description_full() or "").strip()
# if the existing description wasn't generated by the pr-agent, just return it as-is
if not description.startswith("## PR Type"):
if not any(description.startswith(header) for header in ("## PR Type", "## PR Description")):
return description
# if the existing description was generated by the pr-agent, but it doesn't contain the user description,
# return nothing (empty string) because it means there is no user description