diff --git a/docs/DESCRIBE.md b/docs/DESCRIBE.md index c3fe7f93..3db21a13 100644 --- a/docs/DESCRIBE.md +++ b/docs/DESCRIBE.md @@ -35,8 +35,6 @@ For example, if the PR original description was: ``` User content... -## PR Type: -pr_agent:pr_type ## PR Description: pr_agent:summary @@ -44,7 +42,7 @@ pr_agent:summary ## PR Walkthrough: pr_agent:walkthrough ``` -The marker `pr_agent:pr_type` will be replaced with the PR type, `pr_agent:summary` will be replaced with the PR summary, and `pr_agent:walkthrough` will be replaced with the PR walkthrough. +The marker `pr_agent:summary` will be replaced with the PR summary, and `pr_agent:walkthrough` will be replaced with the PR walkthrough. ##### Example: ``` diff --git a/pics/describe_markers_after.png b/pics/describe_markers_after.png index bc9fd5d9..933cf924 100644 Binary files a/pics/describe_markers_after.png and b/pics/describe_markers_after.png differ diff --git a/pics/describe_markers_before.png b/pics/describe_markers_before.png index 66a8b8f0..2c86653a 100644 Binary files a/pics/describe_markers_before.png and b/pics/describe_markers_before.png differ diff --git a/pr_agent/tools/pr_description.py b/pr_agent/tools/pr_description.py index 1561f53c..c1bd03fd 100644 --- a/pr_agent/tools/pr_description.py +++ b/pr_agent/tools/pr_description.py @@ -186,6 +186,11 @@ class PRDescription: else: ai_header = "" + ai_type = self.data.get('PR Type') + if ai_type and not re.search(r'', body): + pr_type = f"{ai_header}{ai_type}" + body = body.replace('pr_agent:type', pr_type) + ai_summary = self.data.get('PR Description') if ai_summary and not re.search(r'', body): summary = f"{ai_header}{ai_summary}"