Get commit messages bewteen git tags or commit hashes.
MIT License
Get commit messages between git tags or commit hashes.
$ npm install --save commits-between
const commitsBetween = require('commits-between')
commitsBetween({from: 'v0.0.1'})
// commits from tag v0.0.1 to HEAD
commitsBetween({from: 'v0.0.1', to: 'v0.0.2'})
// commits from tag v0.0.1 to v0.0.2
//=> return a __Promise__ which resolves:
[ { commit:
{ long: 'd3c1d4277bea361e2aec19068f909262cf51f678',
short: 'd3c1d42' },
tree:
{ long: 'd95361141f51314048917373cc34de25cefd8789',
short: 'd953611' },
author:
{ name: 'Your Name',
email: '[email protected]',
date: Fri May 20 2016 16:14:49 GMT+0800 (CST) },
committer:
{ name: 'Your Name',
email: '[email protected]',
date: Fri May 20 2016 16:14:49 GMT+0800 (CST) },
subject: 'yeah',
body: 'hello world\n' } ]
// commit hash works too
commitsBetween({from: '73e7dab2b07e68b3', to: 'ee36f4bcc7bcaf'})
// or all commits
commitsBetween()
Return a Promise which resolves an array of commits.
Type: object
Type: string
From this tag or commit hash.
Type: string
Before this tag or commit hash, default is HEAD
.
Type: string
Default: process.cwd()
Choose a working directory to resolve commits
MIT © EGOIST