Pull request branch name should contain both the issue number and the title of the issue. #14
|
@ -24,8 +24,8 @@ def generate_branch_name(issue_number: str, issue_title: str) -> str:
|
||||||
Non-alphanumeric characters (except spaces) are removed,
|
Non-alphanumeric characters (except spaces) are removed,
|
||||||
the text is lowercased, and spaces are replaced with dashes.
|
the text is lowercased, and spaces are replaced with dashes.
|
||||||
"""
|
"""
|
||||||
title_slug = issue_title.lower().replace(" ", "-")
|
sanitized = re.sub(r"[^0-9a-zA-Z ]+", "", issue_title)
|
||||||
return f"issue-{issue_number}-{title_slug}"
|
return "issue-" + "-".join(sanitized.lower().split())
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user