spacedentist / spr

Submit pull requests for individual, amendable, rebaseable commits to GitHub
https://getcord.github.io/spr/
MIT License
391 stars 41 forks source link

Refuse to work on commit messages without title #17

Closed sven-of-cord closed 2 years ago

sven-of-cord commented 2 years ago

Submitting a Pull Request fails when the commit message has no title (e.g. starts with "Test Plan:" right away). It fails because the branch name constructed from the title is invalid (at least if the branch name prefix ends in '/'). Instead, with this change, you'll get an error explicitly pointing out the missing title.

Test Plan: try to submit this commit with no title in the commit message. (Start the message with 'Test plan:' to do that). spr should refuse to create the Pull Request, and complain about the lack of a title in the commit message. Also: run spr format with a commit message without title in the local branch. It should complain.