mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-02 11:50:37 +08:00
fix question cli
This commit is contained in:
@ -39,13 +39,12 @@ reflect - Ask the PR author questions about the PR.
|
|||||||
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']:
|
||||||
question = ' '.join(args.rest).strip()
|
if len(args.rest) == 0:
|
||||||
if len(question) == 0:
|
|
||||||
print("Please specify a question")
|
print("Please specify a question")
|
||||||
parser.print_help()
|
parser.print_help()
|
||||||
return
|
return
|
||||||
print(f"Question: {question} about PR {args.pr_url}")
|
print(f"Question: {' '.join(args.rest)} about PR {args.pr_url}")
|
||||||
reviewer = PRQuestions(args.pr_url, question)
|
reviewer = PRQuestions(args.pr_url, args.rest)
|
||||||
asyncio.run(reviewer.answer())
|
asyncio.run(reviewer.answer())
|
||||||
elif command in ['describe', 'describe_pr']:
|
elif command in ['describe', 'describe_pr']:
|
||||||
print(f"PR description: {args.pr_url}")
|
print(f"PR description: {args.pr_url}")
|
||||||
|
Reference in New Issue
Block a user