Skip to content

Instantly share code, notes, and snippets.

@jayuen
Created December 23, 2014 20:07
Show Gist options
  • Save jayuen/b730a2dda7be1076b482 to your computer and use it in GitHub Desktop.
Save jayuen/b730a2dda7be1076b482 to your computer and use it in GitHub Desktop.
javascript:(function(){
var ticketId = jQuery("#card-index").text().trim().replace("#", "");
var ticketDescription = jQuery("#card-short-description").text().trim().replace(/\W/g, ' ').replace(/([A-Z][a-z])/g,'$1').replace(/\s{2,}/g, ' ').trim();
var branchName = (ticketId + " " + ticketDescription).split(" ").join("_").toLowerCase();
jQuery("#card-short-description").after("<h1>git checkout -b " + branchName + "</h1>")
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment