Skip to content

Commit

Permalink
fix: Better strategy to detect merge commits (#132)
Browse files Browse the repository at this point in the history
* fix: avoid edge cases when identifying merge commits.

* fix: revert changes to dist/.
  • Loading branch information
neverendingqs committed Oct 31, 2021
1 parent 4feeedb commit f913d37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ module.exports = async function run() {
// GitHub does not count merge commits when deciding whether to use
// the PR title or a commit message for the squash commit message.
nonMergeCommits = commits.filter(
(commit) => !commit.commit.message.startsWith('Merge branch')
(commit) => commit.parents.length < 2
);

// We only need two non-merge commits to know that the PR
Expand Down

0 comments on commit f913d37

Please sign in to comment.