Merged in bugfix/customize-pr-title-on-environment-merges (pull request #74)
bugfix: change pr title on merges between environments Approved-by: Jonathan Teran
This commit is contained in:
@@ -120,6 +120,10 @@ def create_pull_request(token: str, branch: str, target: str):
|
|||||||
Git("pull").exec(print="Obteniendo cambios")
|
Git("pull").exec(print="Obteniendo cambios")
|
||||||
|
|
||||||
def _get_pr_title_from_branch(branch: str) -> str:
|
def _get_pr_title_from_branch(branch: str) -> str:
|
||||||
|
if branch in environments:
|
||||||
|
target = environments[environments.index(branch) + 1]
|
||||||
|
return f"Sincronización de entorno {branch} a {target}"
|
||||||
|
|
||||||
components = branch.split("/") # <type>/<desc> or release/<env>/<type>/<desc>
|
components = branch.split("/") # <type>/<desc> or release/<env>/<type>/<desc>
|
||||||
branch_type = components[-2]
|
branch_type = components[-2]
|
||||||
branch_desc = components[-1]
|
branch_desc = components[-1]
|
||||||
@@ -140,4 +144,4 @@ def _get_pr_title_from_branch(branch: str) -> str:
|
|||||||
branch_type + ":",
|
branch_type + ":",
|
||||||
branch_ticket,
|
branch_ticket,
|
||||||
branch_desc.replace("-", " ")
|
branch_desc.replace("-", " ")
|
||||||
]))
|
]))
|
||||||
|
|||||||
Reference in New Issue
Block a user