Skip to content

Instantly share code, notes, and snippets.

@irace
Created February 24, 2015 18:32
Show Gist options
  • Save irace/9f3fe5ab1d6fa6630552 to your computer and use it in GitHub Desktop.
Save irace/9f3fe5ab1d6fa6630552 to your computer and use it in GitHub Desktop.
Highlight GitHub pull requests with merge conflicts
$('li.list-group-item').each(function() {
var $pr = $(this);
$.get(window.location.origin + $pr.find('.list-group-item-name a').first().attr('href'), function (html) {
var message = $(html).find('.merge-branch-heading').text()
, mergeable = message.indexOf("can be") > -1;
if (!mergeable) {
$pr.css('backgroundColor', '#fbc0c0');
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment