commit-message-checker
commit-message-checker copied to clipboard
[FEATURE] Skip merge commits in pull requests
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.
Thanks for your PR @GriceTurrble . In the meantime I've extended the tests and also added the feature to the push event.
Skipping merge commits is an interesting and useful feature. is this PR still valid?