refactor(pre): use gitHead information from registry
This commit is contained in:
+3
-5
@@ -4,10 +4,8 @@ var git = require('conventional-changelog/lib/git')
|
||||
|
||||
var efh = require('../error').efh
|
||||
|
||||
module.exports = function (cb) {
|
||||
git.latestTag(efh(cb)(function (from) {
|
||||
git.getCommits({from: from}, efh(cb)(function (commits) {
|
||||
cb(null, commits)
|
||||
}))
|
||||
module.exports = function (from, cb) {
|
||||
git.getCommits({from: from}, efh(cb)(function (commits) {
|
||||
cb(null, commits)
|
||||
}))
|
||||
}
|
||||
|
||||
+2
-2
@@ -4,8 +4,8 @@ var analyze = require('./analyze')
|
||||
var commits = require('./commits')
|
||||
var efh = require('../error').efh
|
||||
|
||||
module.exports = function (cb) {
|
||||
commits(efh(cb)(function (commits) {
|
||||
module.exports = function (gitHead, cb) {
|
||||
commits(gitHead, efh(cb)(function (commits) {
|
||||
cb(null, analyze(commits))
|
||||
}))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user