Added force push option
Reviewed-by: tischrei <tino.schreiber@t-systems.com> Co-authored-by: Gode, Sebastian <sebastian.gode@t-systems.com> Co-committed-by: Gode, Sebastian <sebastian.gode@t-systems.com>
This commit is contained in:
parent
d4d35ff02c
commit
4fa75d7af6
@ -248,7 +248,7 @@ def process_repositories(args, service):
|
|||||||
args.commit_description
|
args.commit_description
|
||||||
)
|
)
|
||||||
push_args = ["--set-upstream", "origin", branch_name]
|
push_args = ["--set-upstream", "origin", branch_name]
|
||||||
if args.branch_force:
|
if args.force_push:
|
||||||
push_args.append("--force")
|
push_args.append("--force")
|
||||||
repo_to.git.push(*push_args)
|
repo_to.git.push(*push_args)
|
||||||
if "github" in url_to:
|
if "github" in url_to:
|
||||||
@ -328,6 +328,11 @@ def main():
|
|||||||
help=("Whether to overwrite index.rst for service-based-view."
|
help=("Whether to overwrite index.rst for service-based-view."
|
||||||
+ "\nCan only be used if --update-sbv is also specified")
|
+ "\nCan only be used if --update-sbv is also specified")
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--force-push",
|
||||||
|
action="store_true",
|
||||||
|
help="Whether to force push the commit"
|
||||||
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--commit-description",
|
"--commit-description",
|
||||||
default=(
|
default=(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user