diff --git a/pr_agent/algo/utils.py b/pr_agent/algo/utils.py index 7af40f67..1e5c652a 100644 --- a/pr_agent/algo/utils.py +++ b/pr_agent/algo/utils.py @@ -42,7 +42,7 @@ def convert_to_markdown(output_data: dict, gfm_supported: bool=True) -> str: "General suggestions": "💡", "Insights from user's answers": "📝", "Code feedback": "🤖", - "Estimated time to review": "⏱️", + "Estimated effort to review": "⏱️", } for key, value in output_data.items(): diff --git a/pr_agent/settings/configuration.toml b/pr_agent/settings/configuration.toml index 40abcce8..a272e1f9 100644 --- a/pr_agent/settings/configuration.toml +++ b/pr_agent/settings/configuration.toml @@ -18,7 +18,7 @@ require_focused_review=false require_score_review=false require_tests_review=true require_security_review=true -require_estimate_time_to_review=false +require_estimate_effort_to_review=true num_code_suggestions=4 inline_code_comments = false ask_and_reflect=false diff --git a/pr_agent/settings/pr_reviewer_prompts.toml b/pr_agent/settings/pr_reviewer_prompts.toml index a89ea7eb..90ac91cc 100644 --- a/pr_agent/settings/pr_reviewer_prompts.toml +++ b/pr_agent/settings/pr_reviewer_prompts.toml @@ -85,12 +85,12 @@ PR Analysis: code diff changes are too scattered, then the PR is not focused. Explain your answer shortly. {%- endif %} -{%- if require_estimate_time_to_review %} - Estimated time to review: +{%- if require_estimate_effort_to_review %} + Estimated effort to review [1-5]: type: string description: >- - Estimate, in minutes, how much time it would take for an experienced developer to review this PR, and provide meaningful feedback. - Take into account the size, complexity, quality and possible needed changes of the PR code diff. + Estimate, on a scale of 1-5 (inclusive), the time and effort required to review this PR by an experienced and knowledgeable developer. 1 means short and easy review , 5 means long and hard review. + Take into account the size, complexity, quality, and the needed changes of the PR code diff. Explain your answer shortly (1-2 sentences). {%- endif %} PR Feedback: diff --git a/pr_agent/tools/pr_reviewer.py b/pr_agent/tools/pr_reviewer.py index fb8984a2..b6bca536 100644 --- a/pr_agent/tools/pr_reviewer.py +++ b/pr_agent/tools/pr_reviewer.py @@ -59,7 +59,7 @@ class PRReviewer: "require_tests": get_settings().pr_reviewer.require_tests_review, "require_security": get_settings().pr_reviewer.require_security_review, "require_focused": get_settings().pr_reviewer.require_focused_review, - "require_estimate_time_to_review": get_settings().pr_reviewer.require_estimate_time_to_review, + "require_estimate_effort_to_review": get_settings().pr_reviewer.require_estimate_effort_to_review, 'num_code_suggestions': get_settings().pr_reviewer.num_code_suggestions, 'question_str': question_str, 'answer_str': answer_str,