mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-09 07:10:37 +08:00
Merge branch 'main' into zmeir-review_score
This commit is contained in:
@ -132,7 +132,7 @@ Here are several ways to install and run PR-Agent:
|
|||||||
|
|
||||||
## How it works
|
## How it works
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Check out the [PR Compression strategy](./PR_COMPRESSION.md) page for more details on how we convert a code diff to a manageable LLM prompt
|
Check out the [PR Compression strategy](./PR_COMPRESSION.md) page for more details on how we convert a code diff to a manageable LLM prompt
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@ def convert_to_markdown(output_data: dict) -> str:
|
|||||||
"Focused PR": "✨",
|
"Focused PR": "✨",
|
||||||
"Security concerns": "🔒",
|
"Security concerns": "🔒",
|
||||||
"General PR suggestions": "💡",
|
"General PR suggestions": "💡",
|
||||||
|
"Insights from user's answers": "📝",
|
||||||
"Code suggestions": "🤖"
|
"Code suggestions": "🤖"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ from pr_agent.tools.pr_questions import PRQuestions
|
|||||||
from pr_agent.tools.pr_reviewer import PRReviewer
|
from pr_agent.tools.pr_reviewer import PRReviewer
|
||||||
|
|
||||||
|
|
||||||
def run():
|
def run(args=None):
|
||||||
parser = argparse.ArgumentParser(description='AI based pull request analyzer', usage="""\
|
parser = argparse.ArgumentParser(description='AI based pull request analyzer', usage="""\
|
||||||
Usage: cli.py --pr-url <URL on supported git hosting service> <command> [<args>].
|
Usage: cli.py --pr-url <URL on supported git hosting service> <command> [<args>].
|
||||||
For example:
|
For example:
|
||||||
@ -35,7 +35,7 @@ reflect - Ask the PR author questions about the PR.
|
|||||||
'reflect', 'review_after_reflect'],
|
'reflect', 'review_after_reflect'],
|
||||||
default='review')
|
default='review')
|
||||||
parser.add_argument('rest', nargs=argparse.REMAINDER, default=[])
|
parser.add_argument('rest', nargs=argparse.REMAINDER, default=[])
|
||||||
args = parser.parse_args()
|
args = parser.parse_args(args)
|
||||||
logging.basicConfig(level=os.environ.get("LOGLEVEL", "INFO"))
|
logging.basicConfig(level=os.environ.get("LOGLEVEL", "INFO"))
|
||||||
command = args.command.lower()
|
command = args.command.lower()
|
||||||
if command in ['ask', 'ask_question']:
|
if command in ['ask', 'ask_question']:
|
||||||
|
@ -24,7 +24,7 @@ class PRReviewer:
|
|||||||
self.is_answer = is_answer
|
self.is_answer = is_answer
|
||||||
if self.is_answer and not self.git_provider.is_supported("get_issue_comments"):
|
if self.is_answer and not self.git_provider.is_supported("get_issue_comments"):
|
||||||
raise Exception(f"Answer mode is not supported for {settings.config.git_provider} for now")
|
raise Exception(f"Answer mode is not supported for {settings.config.git_provider} for now")
|
||||||
answer_str = question_str = self._get_user_answers()
|
answer_str, question_str = self._get_user_answers()
|
||||||
self.ai_handler = AiHandler()
|
self.ai_handler = AiHandler()
|
||||||
self.patches_diff = None
|
self.patches_diff = None
|
||||||
self.prediction = None
|
self.prediction = None
|
||||||
|
Reference in New Issue
Block a user