Skip to content

Commit

Permalink
Estimated time to review
Browse files Browse the repository at this point in the history
  • Loading branch information
mrT23 committed Sep 15, 2023
1 parent 084256b commit caaee4e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions pr_agent/algo/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +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": "⏱️",
}

for key, value in output_data.items():
Expand Down
1 change: 1 addition & 0 deletions pr_agent/settings/configuration.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ require_focused_review=false
require_score_review=false
require_tests_review=true
require_security_review=true
require_estimate_time_to_review=false
num_code_suggestions=4
inline_code_comments = false
ask_and_reflect=false
Expand Down
8 changes: 8 additions & 0 deletions pr_agent/settings/pr_reviewer_prompts.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,14 @@ 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:
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.
Explain your answer shortly (1-2 sentences).
{%- endif %}
PR Feedback:
General suggestions:
type: string
Expand Down
1 change: 1 addition & 0 deletions pr_agent/tools/pr_reviewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def __init__(self, pr_url: str, is_answer: bool = False, is_auto: bool = False,
"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,
'num_code_suggestions': get_settings().pr_reviewer.num_code_suggestions,
'question_str': question_str,
'answer_str': answer_str,
Expand Down

0 comments on commit caaee4e

Please sign in to comment.