mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-12-11 18:35:18 +00:00
Fix get_user_description in case pr_description.enable_pr_type=false
Fixes an issue when getting the user description after a PR-Agent description was already generated, in case the configuration setting `pr_description.enable_pr_type` was `false`.
This commit is contained in:
parent
c5f9bbbf92
commit
7d89b82967
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue