Last active
August 29, 2015 13:56
-
-
Save breyten/9250600 to your computer and use it in GitHub Desktop.
Make a new issue have sane defaults by setting a default milestone & assignee
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
// ==UserScript== | |
// @name GithubNewIssueDefaults | |
// @namespace http://yerb.net/ | |
// @version 0.1 | |
// @description Make a new issue have sane defaults -- milestone & assignee | |
// @match https://github.com/*/*/issues/new | |
// @copyright 2013, Breyten Ernsting | |
// @require http://code.jquery.com/jquery-latest.js | |
// ==/UserScript== | |
$(document).ready(function(){ | |
setTimeout(function() { | |
var user = $('#user-links a.name').attr('href').substr(1); | |
var assignee_input = $('input[name="issue[assignee]"][value="' + user + '"]'); | |
$('.js-composer-assignee-picker span[role="button"]').click(); | |
assignee_input.click(); | |
$('.js-composer-milestone-picker span[role="button"]').click(); | |
$('.js-composer-milestone-picker').find('*[role="menuitem"]').click(); | |
}, 1); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment