mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-05 05:10:38 +08:00
works
This commit is contained in:
@ -24,7 +24,7 @@ You must use the following JSON schema to format your answer:
|
|||||||
},
|
},
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- if question_str %}
|
{%- if question_str %}
|
||||||
"Insights from user's answers": {
|
"Insights from user's answer": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "shortly summarize the insights you gained from the user's answers to the questions"
|
"description": "shortly summarize the insights you gained from the user's answers to the questions"
|
||||||
},
|
},
|
||||||
|
@ -21,7 +21,7 @@ class PRInformationFromUser:
|
|||||||
self.vars = {
|
self.vars = {
|
||||||
"title": self.git_provider.pr.title,
|
"title": self.git_provider.pr.title,
|
||||||
"branch": self.git_provider.get_pr_branch(),
|
"branch": self.git_provider.get_pr_branch(),
|
||||||
"description": self.git_provider.get_description(),
|
"description": self.git_provider.get_pr_description(),
|
||||||
"language": self.main_pr_language,
|
"language": self.main_pr_language,
|
||||||
"diff": "", # empty diff for initial calculation
|
"diff": "", # empty diff for initial calculation
|
||||||
}
|
}
|
||||||
|
@ -118,12 +118,16 @@ class PRReviewer:
|
|||||||
except json.decoder.JSONDecodeError:
|
except json.decoder.JSONDecodeError:
|
||||||
data = try_fix_json(review)
|
data = try_fix_json(review)
|
||||||
|
|
||||||
for d in data['PR Feedback']['Code suggestions']:
|
if settings.config.pr_reviewer > 0:
|
||||||
relevant_file = d['relevant file'].strip()
|
try:
|
||||||
relevant_line_in_file = d['relevant line in file'].strip()
|
for d in data['PR Feedback']['Code suggestions']:
|
||||||
content = d['suggestion content']
|
relevant_file = d['relevant file'].strip()
|
||||||
|
relevant_line_in_file = d['relevant line in file'].strip()
|
||||||
|
content = d['suggestion content']
|
||||||
|
|
||||||
self.git_provider.publish_inline_comment(content, relevant_file, relevant_line_in_file)
|
self.git_provider.publish_inline_comment(content, relevant_file, relevant_line_in_file)
|
||||||
|
except KeyError:
|
||||||
|
pass
|
||||||
|
|
||||||
def _get_user_answers(self):
|
def _get_user_answers(self):
|
||||||
answer_str = question_str = ""
|
answer_str = question_str = ""
|
||||||
|
Reference in New Issue
Block a user