Merge commits can be identified by having two parent commits, so we add to the GraphQL query selecting PR commits to also return parents.totalCount. This shows any standard commit having 1 parent, and merge commits having 2.
We can then .filter() out those instances before mapping commit messages.
Should fix #75
Note that TypeScript/JavaScript are not my strong suit. I would appreciate assistance in adding tests and perhaps bringing the same check to the push event.
Merge commits can be identified by having two parent commits, so we add to the GraphQL query selecting PR commits to also return
parents.totalCount
. This shows any standard commit having 1 parent, and merge commits having 2.We can then
.filter()
out those instances before mapping commit messages.Should fix #75
Note that TypeScript/JavaScript are not my strong suit. I would appreciate assistance in adding tests and perhaps bringing the same check to the
push
event.