@@ -44,6 +44,7 @@ def __add_deploy_command_parser(subparsers):
4444 )
4545
4646 __add_git_parser_args (deploy_p )
47+ __add_branch_pr_parser_args (deploy_p )
4748
4849
4950def __add_sync_apps_command_parser (subparsers ):
@@ -65,15 +66,27 @@ def __add_pr_comment_command_parser(subparsers):
6566def __add_create_preview_command_parser (subparsers ):
6667 add_create_preview_p = subparsers .add_parser ("create-preview" , help = "Create a preview environment" )
6768 __add_git_parser_args (add_create_preview_p )
69+ __add_branch_pr_parser_args (add_create_preview_p )
6870 __add_create_prid_parser (add_create_preview_p )
6971
7072
7173def __add_git_parser_args (deploy_p ):
72- deploy_p .add_argument ("-b" , "--branch" , help = "Branch to push the changes to" , default = "master" )
7374 deploy_p .add_argument ("-u" , "--username" , help = "Git username if Basic Auth should be used" )
7475 deploy_p .add_argument ("-p" , "--password" , help = "Git password if Basic Auth should be used" )
7576 deploy_p .add_argument ("-j" , "--git-user" , help = "Git Username" , default = "GitOpsCLI" )
7677 deploy_p .add_argument ("-e" , "--git-email" , help = "Git User Email" , default = "gitopscli@baloise.dev" )
78+ deploy_p .add_argument ("-o" , "--organisation" , help = "Apps Git organisation/projectKey" , required = True )
79+ deploy_p .add_argument (
80+ "-n" , "--repository-name" , help = "Git repository name (not the URL, e.g. my-repo)" , required = True
81+ )
82+ deploy_p .add_argument ("-s" , "--git-provider" , help = "Git server provider" , default = "bitbucket-server" )
83+ deploy_p .add_argument (
84+ "-w" , "--git-provider-url" , help = "Git provider base API URL (e.g. https://bitbucket.example.tld)"
85+ )
86+
87+
88+ def __add_branch_pr_parser_args (deploy_p ):
89+ deploy_p .add_argument ("-b" , "--branch" , help = "Branch to push the changes to" , default = "master" )
7790 deploy_p .add_argument (
7891 "-c" ,
7992 "--create-pr" ,
@@ -92,14 +105,6 @@ def __add_git_parser_args(deploy_p):
92105 const = True ,
93106 default = False ,
94107 )
95- deploy_p .add_argument ("-o" , "--organisation" , help = "Apps Git organisation/projectKey" , required = True )
96- deploy_p .add_argument (
97- "-n" , "--repository-name" , help = "Git repository name (not the URL, e.g. my-repo)" , required = True
98- )
99- deploy_p .add_argument ("-s" , "--git-provider" , help = "Git server provider" , default = "bitbucket-server" )
100- deploy_p .add_argument (
101- "-w" , "--git-provider-url" , help = "Git provider base API URL (e.g. https://bitbucket.example.tld)"
102- )
103108
104109
105110def __add_create_prid_parser (subparsers ):
0 commit comments