We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c738bd3 commit 6b5ee78Copy full SHA for 6b5ee78
app/scripts/contentscript.js
@@ -20,7 +20,11 @@
20
} else {
21
var isWipTitle = /(\[wip\]|\[do\s*not\s*merge\])/i.test(issueTitle);
22
var isWipTaksList = $container.find('.timeline-comment:first input[type="checkbox"]:not(:checked)').length > 0;
23
- disabled = (isWipTitle || isWipTaksList);
+ var isSquashCommits = false;
24
+ $container.find('#commits_bucket .commit .commit-title').each(function(i, elem){
25
+ isSquashCommits = isSquashCommits || $(elem).text().match(/^\s*(squash|fixup)!\s/);
26
+ });
27
+ disabled = (isWipTitle || isWipTaksList || isSquashCommits);
28
buttonHtml = '<span class="octicon octicon-git-merge"></span> ' + (disabled ? 'WIP! You can\'t merge!' : 'Merge pull request');
29
}
30
0 commit comments