commits-between
Get commit messages bewteen git tags.
Last updated 4 years ago by kchan .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install commits-between 
SYNC missed versions from official npm registry.

commits-between NPM version NPM downloads Build Status

Get commit messages between git tags or commit hashes.

Install

$ npm install --save commits-between

Usage

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: 'you@example.com',
       date: Fri May 20 2016 16:14:49 GMT+0800 (CST) },
    committer:
     { name: 'Your Name',
       email: 'you@example.com',
       date: Fri May 20 2016 16:14:49 GMT+0800 (CST) },
    subject: 'yeah',
    body: 'hello world\n' } ]

// since we use `git log --pretty=format:%s%b to get commits`
// so commit hash works too
commitsBetween({from: '73e7dab2b07e68b3', to: 'ee36f4bcc7bcaf'})

// or all commits
commitsBetween()

API

commitsBetween(options)

options

Type: object

from

Type: string
Required: true

From this tag or commit hash.

to

Type: string
Default: ''

Before this tag or commit hash, default is HEAD.

cwd

Type: string
Default: process.cwd()

Choose a working directory to resolve commits

License

MIT © EGOIST

Current Tags

  • 0.2.0                                ...           latest (4 years ago)

2 Versions

  • 0.2.0                                ...           4 years ago
  • 0.1.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 3
Dependencies (2)
Dev Dependencies (2)

Copyright 2014 - 2016 © taobao.org |