Created
September 8, 2016 05:43
-
-
Save brad-jones/6e2db1831459b8a96690040062a8bbfd to your computer and use it in GitHub Desktop.
Bitbucket PR Userscript
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
// ==UserScript== | |
// @name bitbucket.com User Script | |
// @version 0.1 | |
// @description Copies the source branch name into the PR Title. | |
// @author Brad Jones | |
// @include https://bitbucket.org/* | |
// ==/UserScript== | |
$(document).ready(function() | |
{ | |
var updatePrTitle = function() | |
{ | |
$('#id_title').val($('#id_source_group .select2-chosen').text()); | |
}; | |
if ($('#create-pullrequest').length > 0) | |
{ | |
$('select.branch-field[data-field="source"]').on('change', updatePrTitle); | |
updatePrTitle(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment