Skip to content

Commit d40b0d4

Browse files
committed
Revert "fix: Consider merge commits for single commit validation (#127)"
This reverts commit 1b347f7.
1 parent 4e3bb78 commit d40b0d4

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/index.js

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,7 @@ module.exports = async function run() {
5858
per_page: 2
5959
});
6060

61-
// GitHub does not count merge commits when deciding whether to use
62-
// the PR title or a commit message for the squash commit message.
63-
const nonMergeCommits = commits.filter(
64-
(commit) => !commit.message.startsWith('Merge branch')
65-
);
66-
67-
// If there is only one (non merge) commit present, GitHub will use
68-
// that commit rather than the PR title for the title of a squash
69-
// commit. To make sure a semantic title is used for the squash
70-
// commit, we need to validate the commit title.
71-
if (nonMergeCommits.length === 1) {
61+
if (commits.length === 1) {
7262
try {
7363
await validatePrTitle(commits[0].commit.message, {
7464
types,

0 commit comments

Comments
 (0)