bugfix: uso distintos target branches para obtener env y type de ramas dev y release
This commit is contained in:
@@ -232,6 +232,8 @@ def merge_command():
|
||||
return
|
||||
|
||||
(target, _) = get_branch_env_and_type(branch)
|
||||
print_info("target branch: " + target)
|
||||
return
|
||||
status = Git.status()
|
||||
remote = Git.flow_config("flow.remote").firstline()
|
||||
|
||||
@@ -316,13 +318,7 @@ def parse_url(url: str) -> list[str]:
|
||||
|
||||
def get_branch_env_and_type(branch: str) -> tuple[str, str]:
|
||||
components = branch.split("/")
|
||||
target_branches = (
|
||||
Git.flow_config("flow.branches")
|
||||
.firstline() # dev test main
|
||||
.split(" ") # [dev, test, main]
|
||||
[1:] # [test, main] (dev no deberia ser un release)
|
||||
)
|
||||
|
||||
target_branches = Git.flow_config("flow.branches").firstline().split(" ")
|
||||
|
||||
if len(components) == 2:
|
||||
if components[0] not in BRANCH_TYPES:
|
||||
@@ -330,6 +326,8 @@ def get_branch_env_and_type(branch: str) -> tuple[str, str]:
|
||||
|
||||
return (target_branches[0], components[0])
|
||||
elif len(components) == 4:
|
||||
target_branches = target_branches[1:]
|
||||
|
||||
if (
|
||||
components[0] != "release"
|
||||
or components[1] not in target_branches
|
||||
|
||||
Reference in New Issue
Block a user