-
Notifications
You must be signed in to change notification settings - Fork 590
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix get_user_description
#561
Conversation
The headers changed from "PR Type"/"PR Description"/etc to "Type"/"Description"/etc
PR Description updated to latest commit (560d30d) |
PR Analysis
PR Feedback💡 General suggestions: The PR seems to be well-structured and the changes are clearly explained. However, it would be beneficial to include unit tests to verify the new behavior and ensure that the changes work as expected. Also, consider adding comments to the new helper method 🤖 Code feedback:
✨ Usage tips:
|
pr_agent/tools/pr_description.py
Outdated
@@ -297,7 +297,7 @@ def _prepare_pr_answer(self) -> Tuple[str, str]: | |||
value = self.file_label_dict | |||
key_publish = "PR changes walkthrough" | |||
else: | |||
key_publish = key.rstrip(':').replace("_", " ").capitalize() | |||
key_publish = key.rstrip(':').replace("_", " ").title() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't think this is good.
i do want to capitalize only the first letter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
("PR changes walkthrough"
instead of
"PR Changes Walkthrough")
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure I will revert it, I just thought since those are section titles it will be more fitting.
@mrT23 thanks for the review - I reverted the use of |
…ption Fix `get_user_description`
Type
bug_fix
Description
get_user_description
method ingit_provider.py
to handle changes in the headers from "PR Type"/"PR Description"/etc to "Type"/"Description"/etc._is_generated_by_pr_agent
to check if the description was generated by the pr-agent._prepare_pr_answer
method inpr_description.py
to change the formatting of the key_publish variable. Thecapitalize
method was replaced with thetitle
method to ensure each word in the key is capitalized.PR changes walkthrough
1 files
git_provider.py
pr_agent/git_providers/git_provider.py
The method
get_user_description
was updated to handlechanges in the headers from "PR Type"/"PR Description"/etc
to "Type"/"Description"/etc. A new helper method
_is_generated_by_pr_agent
was introduced to check if thedescription was generated by the pr-agent. The extraction of
the user description was also updated to match the new
header format.
1 files
pr_description.py
pr_agent/tools/pr_description.py
The method
_prepare_pr_answer
was updated to change theformatting of the key_publish variable. The
capitalize
method was replaced with the
title
method to ensure eachword in the key is capitalized.
User description
The headers changed from "PR Type"/"PR Description"/etc to "Type"/"Description"/etc