mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-14 17:50:37 +08:00
Merge pull request #568 from Codium-ai/tr/user_description
Enhancement: Improved Extraction and Placement of User Descriptions in PRs
This commit is contained in:
@ -185,7 +185,12 @@ class PRDescription:
|
||||
# Load the AI prediction data into a dictionary
|
||||
self.data = load_yaml(self.prediction.strip())
|
||||
|
||||
if get_settings().pr_description.add_original_user_description and self.user_description:
|
||||
self.data["User Description"] = self.user_description
|
||||
|
||||
# re-order keys
|
||||
if 'User Description' in self.data:
|
||||
self.data['User Description'] = self.data.pop('User Description')
|
||||
if 'title' in self.data:
|
||||
self.data['title'] = self.data.pop('title')
|
||||
if 'type' in self.data:
|
||||
@ -197,8 +202,7 @@ class PRDescription:
|
||||
if 'pr_files' in self.data:
|
||||
self.data['pr_files'] = self.data.pop('pr_files')
|
||||
|
||||
if get_settings().pr_description.add_original_user_description and self.user_description:
|
||||
self.data["User Description"] = self.user_description
|
||||
|
||||
|
||||
|
||||
def _prepare_labels(self) -> List[str]:
|
||||
|
Reference in New Issue
Block a user