Skip to content

Instantly share code, notes, and snippets.

@aslakhellesoy
Last active December 18, 2015 05:49
Show Gist options
  • Select an option

  • Save aslakhellesoy/5735128 to your computer and use it in GitHub Desktop.

Select an option

Save aslakhellesoy/5735128 to your computer and use it in GitHub Desktop.
This bookmarklet shows what milestone each issue is assigned to. Very handy when moving a bunch of issues into different milestones. Github - can you make this default behaviour on Github?
javascript:$('.issue-list-item').each(function(n, dom_issue) {
var id = dom_issue.id.match(/issue_(\d+)/)[1];
/* Create your own here: https://github.com/settings/applications */
var token = 'SECRET';
$.get('https://api.github.com/repos' + window.location.pathname + '/' + id + '?access_token=' + token).success(function(issue) {
if(issue.milestone && issue.milestone.title) {
var $issue_number = $(dom_issue).find('.list-group-item-number');
$issue_number.text('(' + issue.milestone.title + ') ' + $issue_number.text());
}
}).error(function(e) {
console.log("error for " + id);
});
});
@aslakhellesoy
Copy link
Author

screehsot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment