add support for PR sequence diagram in description markers

This commit is contained in:
Abhinav Kumar
2025-07-02 18:07:54 +05:30
parent 9e20373cb0
commit df8290a290
4 changed files with 11 additions and 2 deletions

View File

@ -538,6 +538,10 @@ class PRDescription:
get_logger().error(f"Failing to process walkthrough {self.pr_id}: {e}")
body = body.replace('pr_agent:walkthrough', "")
ai_diagram = self.data.get('changes_diagram')
if ai_diagram and not re.search(r'<!--\s*pr_agent:diagram\s*-->', body):
body = body.replace('pr_agent:diagram', ai_diagram)
return title, body, walkthrough_gfm, pr_file_changes
def _prepare_pr_answer(self) -> Tuple[str, str, str, List[dict]]: