Skip to content

Commit

Permalink
Merge pull request #1442 from benedict-lee/fix/pr-type-rendering-with…
Browse files Browse the repository at this point in the history
…-markers

fix : pr type rendering with markers
  • Loading branch information
mrT23 authored Jan 7, 2025
2 parents 2783f9b + f4b895d commit 6bb5ce5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pr_agent/tools/pr_description.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,11 @@ def _prepare_pr_answer_with_markers(self) -> Tuple[str, str, str, List[dict]]:

ai_type = self.data.get('type')
if ai_type and not re.search(r'<!--\s*pr_agent:type\s*-->', body):
pr_type = f"{ai_header}{ai_type}"
if isinstance(ai_type, list):
pr_types = [f"{ai_header}{t}" for t in ai_type]
pr_type = ','.join(pr_types)
else:
pr_type = f"{ai_header}{ai_type}"
body = body.replace('pr_agent:type', pr_type)

ai_summary = self.data.get('description')
Expand Down

0 comments on commit 6bb5ce5

Please sign in to comment.