Last active
October 8, 2015 10:39
-
-
Save AlexanderTserkovniy/7415fb207593c669537b to your computer and use it in GitHub Desktop.
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
javascript: (function (log) {var name = jQuery('.ghx-issue-compact.ghx-selected .js-key-link, .ghx-issue.ghx-selected .js-key-link, .ghx-swimlane-header.ghx-selected .js-detailview').text(); var description = jQuery('.ghx-issue.ghx-selected .ghx-inner, .ghx-issue-compact.ghx-selected .ghx-inner').text(); var description = description || jQuery('.ghx-swimlane-header.ghx-selected .ghx-summary').contents().filter(function() {return this.nodeType === 3; }).text(); var transformed = {name: name.trim().toLowerCase(), description: description.trim().toLowerCase().replace(/[,\.\-\&'"]/g, '') }; var result = [transformed.name + '-' + transformed.description.split(' ').join('-'), name + ' ' + description ]; log(['git checkout -b ' + result[0] ].concat(result)); })(console.log.bind(console)); |
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
(function (log) { | |
var name = jQuery('.ghx-issue-compact.ghx-selected .js-key-link, .ghx-issue.ghx-selected .js-key-link, .ghx-swimlane-header.ghx-selected .js-detailview').text(); | |
var description = jQuery('.ghx-issue.ghx-selected .ghx-inner, .ghx-issue-compact.ghx-selected .ghx-inner').text(); | |
var description = description || jQuery('.ghx-swimlane-header.ghx-selected .ghx-summary').contents().filter(function() { | |
return this.nodeType === 3; | |
}).text(); | |
var transformed = { | |
name: name.trim().toLowerCase(), | |
description: description.trim().toLowerCase().replace(/[,\.\-\&'"]/g, '') | |
}; | |
var result = [ | |
transformed.name + '-' + transformed.description.split(' ').join('-'), | |
name + ' ' + description | |
]; | |
log([ | |
'git checkout -b ' + result[0] | |
].concat(result)); | |
})(console.log.bind(console)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment