Last active
November 15, 2017 14:14
-
-
Save JoshuaSoileau/3bde42f8934054620a2aed4344a3bf22 to your computer and use it in GitHub Desktop.
Parses out a new feature branch name for you, as long as you are viewing a jira task
This file contains hidden or 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
// Parses out a new feature branch name for you, as long as you are viewing a jira task | |
// Create a new Bookmark, and use the code below as the URL (name can be anything) | |
javascript:(function(){String.prototype.replaceAll=function(search,replacement){var target=this;return target.replace(new RegExp(search,'g'),replacement)};var fullTitle=document.getElementById('summary-val').textContent.toLowerCase(),taskNumber=document.getElementById('key-val').textContent,titleArray=fullTitle.split('|').map(function(ele){return ele.trim()}),taskName=titleArray.pop().replaceAll(' ','-'),affectedTheme=titleArray.join('-').replaceAll(' ','-');var site=null;prompt('Copy to clipboard: Ctrl+C, Enter', 'feature/'+taskNumber+'__'+affectedTheme+'__'+taskName);}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment