Fix channel when people use - instead of _ in their branch name

This commit is contained in:
jspijker 2022-11-18 11:44:57 +01:00
parent f60463a237
commit cc36da86b1

View File

@ -118,7 +118,7 @@ jobs:
elif ref_name in ("main", "master"):
channel = 'testing'
else:
channel = repo.active_branch.name.split("_")[0].replace("-", "_").lower()
channel = "_".join(repo.active_branch.name.replace("-", "_").split("_")[:2]).lower()
if "pull_request" in event_name:
channel = f"pr_{issue_number}"