Skip to content

Commit

Permalink
Merge pull request #449 from zmeir/patch-1
Browse files Browse the repository at this point in the history
Fix `get_user_description` in case `pr_description.enable_pr_type=false`
  • Loading branch information
mrT23 authored Nov 15, 2023
2 parents c5f9bbb + 7d89b82 commit e878bbb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pr_agent/git_providers/git_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def get_pr_description(self, *, full: bool = True) -> str:
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
Expand Down

0 comments on commit e878bbb

Please sign in to comment.