From 4fa75d7af6e6810334b0f67c18badae0caad4acc Mon Sep 17 00:00:00 2001 From: "Gode, Sebastian" Date: Thu, 25 May 2023 12:10:54 +0000 Subject: [PATCH] Added force push option Reviewed-by: tischrei Co-authored-by: Gode, Sebastian Co-committed-by: Gode, Sebastian --- tools/generate_doc_confpy.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/generate_doc_confpy.py b/tools/generate_doc_confpy.py index 728e8686..a9b0afc9 100644 --- a/tools/generate_doc_confpy.py +++ b/tools/generate_doc_confpy.py @@ -248,7 +248,7 @@ def process_repositories(args, service): args.commit_description ) push_args = ["--set-upstream", "origin", branch_name] - if args.branch_force: + if args.force_push: push_args.append("--force") repo_to.git.push(*push_args) if "github" in url_to: @@ -328,6 +328,11 @@ def main(): help=("Whether to overwrite index.rst for service-based-view." + "\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( "--commit-description", default=(