feat: update branch name generation to sanitize issue title input
This commit is contained in:
parent
4e014d4df4
commit
298402ff2b
|
@ -24,8 +24,8 @@ def generate_branch_name(issue_number: str, issue_title: str) -> str:
|
|||
Non-alphanumeric characters (except spaces) are removed,
|
||||
the text is lowercased, and spaces are replaced with dashes.
|
||||
"""
|
||||
title_slug = issue_title.lower().replace(" ", "-")
|
||||
return f"issue-{issue_number}-{title_slug}"
|
||||
sanitized = re.sub(r"[^0-9a-zA-Z ]+", "", issue_title)
|
||||
return "issue-" + "-".join(sanitized.lower().split())
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user