File tree Expand file tree Collapse file tree 4 files changed +10
-14
lines changed Expand file tree Collapse file tree 4 files changed +10
-14
lines changed Original file line number Diff line number Diff line change @@ -27,12 +27,8 @@ def main():
2727 get_settings().set(" openai.key" , openai_key)
2828 get_settings().set(" github.user_token" , user_token)
2929
30- # Preparing the command
31- run_command = f " --pr_url= { pr_url} { command.lstrip(' /' )} "
32- args = cli.set_parser().parse_args(run_command.split())
33-
3430 # Run the command. Feedback will appear in GitHub PR comments
35- cli.run( args = args )
31+ cli.run_command(pr_url, command )
3632
3733
3834if __name__ == ' __main__' :
Original file line number Diff line number Diff line change @@ -50,6 +50,13 @@ def set_parser():
5050 parser .add_argument ('rest' , nargs = argparse .REMAINDER , default = [])
5151 return parser
5252
53+ def run_command (pr_url , command ):
54+ # Preparing the command
55+ run_command = f"--pr_url={ pr_url } { command .lstrip ('/' )} "
56+ args = set_parser ().parse_args (run_command .split ())
57+
58+ # Run the command. Feedback will appear in GitHub PR comments
59+ run (args = args )
5360
5461def run (inargs = None , args = None ):
5562 parser = set_parser ()
Original file line number Diff line number Diff line change 11from pr_agent import cli
22from pr_agent .config_loader import get_settings
3- from pr_agent .log import setup_logger
4-
5- setup_logger ()
63
74
85def main ():
@@ -18,12 +15,8 @@ def main():
1815 get_settings ().set ("openai.key" , openai_key )
1916 get_settings ().set ("github.user_token" , user_token )
2017
21- # Preparing the command
22- run_command = f"--pr_url={ pr_url } { command .lstrip ('/' )} "
23- args = cli .set_parser ().parse_args (run_command .split ())
24-
2518 # Run the command. Feedback will appear in GitHub PR comments
26- cli .run ( args = args )
19+ cli .run_command ( pr_url , command )
2720
2821
2922if __name__ == '__main__' :
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44
55[project ]
66name = " pr-agent"
7- version = " 0.2.0 "
7+ version = " 0.2.1 "
88
99authors = [{
name =
" CodiumAI" ,
email =
" [email protected] " }]
1010
You can’t perform that action at this time.
0 commit comments