boxuk / commit-message-checker

Checks commit messages
0 stars 2 forks source link

Handle patch commits #32

Open TomSeldon opened 7 years ago

TomSeldon commented 7 years ago

@klj613-boxuk you requested this. Can you give some more information on:

I'll try to implement this ASAP once I have the info.

jenkoian commented 7 years ago

I was about to raise a similar issue, it might be different to what @klj613-boxuk is referring to but here are the details none the less.

When you grab a patch of a PR or commit or whatever github prefix the commit message with [PATCH] in the subject line, for example: https://patch-diff.githubusercontent.com/raw/boxuk/commit-message-checker/pull/25.patch

It's not a github thing afaik, it's just a standard patch convention. Anyway, I think all we need to do to support this is add PATCH to the list of valid commit types. https://github.com/boxuk/commit-message-checker/blob/master/lib/commit-types.js

TomSeldon commented 7 years ago

That sounds correct. I was meaning to ask @klj613-boxuk what he meant as I wasn't able to find what a commit message for a patch usually looked like.

If it's just [PATCH] some commit message then yeah @jenkoian it would just need adding to that file. Existing unit tests should pick it up (as I think they dynamically create unit tests for each allowed commit message type). Not sure of that though.