Commitplease
This node.js module takes a string, validates it as a commit message and returns
a list of problems.
Installation
npm install commitplease
Usage
var commitplease = require('commitplease');
var errors = commitplease(commit.message);
if (errors.length) {
postComment('This commit has ' errors.length + ' problems!');
}
API
commitplease(message[, options])
, returns Array
message
(String
): The commit message to validate. Must use LF (\n
) as line breaks.options
(Object
, optional): Use this to override the default settings, see properties and defaults below- returns
Array
: Empty for valid messages, one or more items as String
for each problem found
Options and their defaults:
component: true,
limits: {
subject: 50,
other: 72
}
License
Copyright 2013 Jörn Zaefferer. Released under the terms of the MIT license.
Support this project by donating on Gittip.