zeke / semantic-pull-requests

:robot: Let the robots take care of the semantic versioning
https://github.com/apps/semantic-pull-requests
Apache License 2.0
1.24k stars 122 forks source link

fix: Fail on single unsemantic non-merge commit #109

Closed Bleggbeard closed 4 years ago

Bleggbeard commented 4 years ago

This fixes yet another caveat of GitHub's behaviour mentioned in #17: GitHub does not count merge commits in this case.

A PR with one regular unsemantic commit and only merge commits afterwards will be allowed by the bot, even though GitHub will replace the squashed title with the one non-merge commit title.

golddove commented 4 years ago

Would love this to get merged in!

@zeke - Additionally, is there a reason to perform this edge-case check only when isVanillaConfig? It'd be nice to be able to configure other options while still enforcing this check.

zeke commented 4 years ago

Thanks for the fix @Jajcoszek 👍🏼

is there a reason to perform this edge-case check only when isVanillaConfig

Yeah, I just didn't want to break any of the other configurations. This project has turned into a game of whack a mole with all the user-contributed configuration, so it's really easy to accidentally break someone's setup when making what seems to be a tiny and benign change. That said, if you want to submit a PR for that, I'd be open to it.

Long term, I would love to be able to migrate folks off this app and onto GitHub Actions, so everyone can have exactly what they want, and can configure things independently at the repo (or organization) level. See #90