peach a19a732be8 commit message | há 2 anos atrás | |
---|---|---|
.. | ||
lib | há 2 anos atrás | |
node_modules | há 2 anos atrás | |
CHANGELOG.md | há 2 anos atrás | |
README.md | há 2 anos atrás | |
license.md | há 2 anos atrás | |
package.json | há 2 anos atrás |
Read commit messages from a specified range or last edit
npm install --save @commitlint/read
const read = require('@commitlint/read').default;
// Read last edited commit message
read({edit: true}).then((messages) => console.log(messages));
// => ['I did something\n\n']
// Read from the third to second commit message from HEAD
read({from: 'HEAD~2', to: 'HEAD~1'}).then((messages) => console.log(messages));
// => ['Initial commit\n\n']
Consult docs/api for comprehensive documentation.