Skip to content

Commit

Permalink
Check un-squashed commits
Browse files Browse the repository at this point in the history
  • Loading branch information
sakatam committed Nov 12, 2014
1 parent c738bd3 commit 6b5ee78
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/scripts/contentscript.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

Expand Down

0 comments on commit 6b5ee78

Please sign in to comment.