From 9c38ca851b11847ed9a93282919eed419dfe990e Mon Sep 17 00:00:00 2001 From: jasquat Date: Mon, 11 Dec 2023 15:32:07 -0500 Subject: [PATCH] added target branch to publish branch name to avoid conflicts between environments w/ burnettk --- .../src/spiffworkflow_backend/services/git_service.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/services/git_service.py b/spiffworkflow-backend/src/spiffworkflow_backend/services/git_service.py index 078e6a81..8657dd8c 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/services/git_service.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/services/git_service.py @@ -266,7 +266,7 @@ class GitService: cls.run_shell_command(cmd) # create publish branch from branch_to_update cls.run_shell_command(["checkout", branch_to_update], context_directory=destination_process_root) - branch_to_pull_request = f"publish-{process_model_id}" + branch_to_pull_request = f"publish-{process_model_id}-to-{branch_to_update}" # check if branch exists and checkout appropriately command = [ @@ -274,6 +274,8 @@ class GitService: "--verify", f"refs/remotes/origin/{branch_to_pull_request}", ] + + # to -b or not to -b if cls.run_shell_command_as_boolean(command, context_directory=destination_process_root): cls.run_shell_command(["checkout", branch_to_pull_request], context_directory=destination_process_root) else: