commit-message-checker icon indicating copy to clipboard operation
commit-message-checker copied to clipboard

[FEATURE] Skip merge commits in pull requests

Open GriceTurrble opened this issue 2 years ago • 2 comments

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.

GriceTurrble avatar Aug 27 '22 01:08 GriceTurrble

Thanks for your PR @GriceTurrble . In the meantime I've extended the tests and also added the feature to the push event.

gilbertsoft avatar Oct 20 '22 07:10 gilbertsoft

Skipping merge commits is an interesting and useful feature. is this PR still valid?

simoneversienti avatar May 27 '24 12:05 simoneversienti