mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-12-12 02:45:18 +00:00
fix: avoid duplicate header for list types to prevent markdown break
This commit is contained in:
parent
36307e66f1
commit
6062c99c47
1 changed files with 3 additions and 3 deletions
|
|
@ -507,10 +507,10 @@ class PRDescription:
|
||||||
ai_type = self.data.get('type')
|
ai_type = self.data.get('type')
|
||||||
if ai_type and not re.search(r'<!--\s*pr_agent:type\s*-->', body):
|
if ai_type and not re.search(r'<!--\s*pr_agent:type\s*-->', body):
|
||||||
if isinstance(ai_type, list):
|
if isinstance(ai_type, list):
|
||||||
pr_types = [f"{ai_header}{t}" for t in ai_type]
|
pr_type = ', '.join(ai_type)
|
||||||
pr_type = ','.join(pr_types)
|
|
||||||
else:
|
else:
|
||||||
pr_type = f"{ai_header}{ai_type}"
|
pr_type = ai_type
|
||||||
|
pr_type = f"{ai_header}{pr_type}"
|
||||||
body = body.replace('pr_agent:type', pr_type)
|
body = body.replace('pr_agent:type', pr_type)
|
||||||
|
|
||||||
ai_summary = self.data.get('description')
|
ai_summary = self.data.get('description')
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue