mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-16 02:30:37 +08:00
Merge remote-tracking branch 'origin/enhancment/markdown' into feature/github_tag_improve
This commit is contained in:
@ -64,6 +64,8 @@ class PRQuestions:
|
||||
return response
|
||||
|
||||
def _prepare_pr_answer(self) -> str:
|
||||
answer_str = f"Questions: {self.question_str}\n\n"
|
||||
answer_str = f"Question: {self.question_str}\n\n"
|
||||
answer_str += f"Answer: {self.prediction.strip()}\n\n"
|
||||
if settings.config.verbosity_level >= 2:
|
||||
logging.info(f"answer_str:\n{answer_str}")
|
||||
return answer_str
|
||||
|
@ -81,6 +81,14 @@ class PRReviewer:
|
||||
except json.decoder.JSONDecodeError:
|
||||
logging.error("Unable to decode JSON response from AI")
|
||||
data = {}
|
||||
|
||||
# reordering for nicer display
|
||||
if 'PR Feedback' in data:
|
||||
if 'Security concerns' in data['PR Feedback']:
|
||||
val = data['PR Feedback']['Security concerns']
|
||||
del data['PR Feedback']['Security concerns']
|
||||
data['PR Analysis']['Security concerns'] = val
|
||||
|
||||
markdown_text = convert_to_markdown(data)
|
||||
user = self.git_provider.get_user_id()
|
||||
markdown_text += "\n### How to use\n"
|
||||
|
Reference in New Issue
Block a user