a bookmarklet to generate the commit message from an open jira story

Posted Almost 10 years ago. Visible to the public.
javascript: (function ($) {
  var branchName = "nothing found" ;
  var story = jQuery(".ghx-fieldname-issuekey a");
  if(story){
    var title = $("[data-field-id='summary']").text();
    var id = story.text();
    
    var translate = {
      "ä": "ae", "ö": "oe", "ü": "ue", "ß": "ss"
    };
    
    var storyType = "feature";

    var commitMessage = "[" +  id + "] " + title;

    prompt('Your commit message:', commitMessage);
  } else {
    alert("Please select the stories first.");
  }
})(jQuery);
Christoph Beck
Posted by Christoph Beck to BitCrowd (2014-06-23 16:08)