mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-05 05:10:38 +08:00
Merge pull request #1442 from benedict-lee/fix/pr-type-rendering-with-markers
fix : pr type rendering with markers
This commit is contained in:
@ -480,7 +480,11 @@ 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):
|
||||||
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)
|
body = body.replace('pr_agent:type', pr_type)
|
||||||
|
|
||||||
ai_summary = self.data.get('description')
|
ai_summary = self.data.get('description')
|
||||||
|
Reference in New Issue
Block a user