Created
February 24, 2015 18:32
-
-
Save irace/9f3fe5ab1d6fa6630552 to your computer and use it in GitHub Desktop.
Highlight GitHub pull requests with merge conflicts
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
$('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