Permalink
Browse files

Check un-squashed commits

  • Loading branch information...
sakatam committed Nov 12, 2014
1 parent c738bd3 commit 6b5ee784bf621651ee72d9431fbed2068c3a2e8f
Showing with 5 additions and 1 deletion.
  1. +5 −1 app/scripts/contentscript.js
@@ -20,7 +20,11 @@
} else {
var isWipTitle = /(\[wip\]|\[do\s*not\s*merge\])/i.test(issueTitle);
var isWipTaksList = $container.find('.timeline-comment:first input[type="checkbox"]:not(:checked)').length > 0;
disabled = (isWipTitle || isWipTaksList);
var isSquashCommits = false;
$container.find('#commits_bucket .commit .commit-title').each(function(i, elem){
isSquashCommits = isSquashCommits || $(elem).text().match(/^\s*(squash|fixup)!\s/);
});
disabled = (isWipTitle || isWipTaksList || isSquashCommits);
buttonHtml = '<span class="octicon octicon-git-merge"></span> ' + (disabled ? 'WIP! You can\'t merge!' : 'Merge pull request');
}

0 comments on commit 6b5ee78

Please sign in to comment.