Created
June 21, 2022 22:17
-
-
Save awesome/bb7de78cc7ed918ac1625c35945f2760 to your computer and use it in GitHub Desktop.
format ticket title to git branch name
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
str = "ZZZ://ZZZZZZ (ZZZZ allocation - slider does not automatically reflect the entered Stop value and requires a click outside o | |
f the Stop input field)" | |
str.downcase.gsub(/\W/, '-').squeeze('-')[0..45].chomp('-') | |
# => "zzz-zzzzzz-zzzz-allocation-slider-does-not-aut" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment