nodegit-flow
Advanced tools
Comparing version 0.1.14 to 0.1.15
@@ -52,3 +52,5 @@ 'use strict'; | ||
key: 'startRelease', | ||
value: function startRelease(repo, releaseVersion) { | ||
value: function startRelease(repo, releaseVersion, options) { | ||
var sha = options.sha; | ||
if (!repo) { | ||
@@ -70,7 +72,12 @@ return Promise.reject(new Error(constants.ErrorMessage.REPO_REQUIRED)); | ||
return NodeGit.Branch.lookup(repo, developBranchName, NodeGit.Branch.BRANCH.LOCAL); | ||
}).then(function (developBranch) { | ||
return NodeGit.Commit.lookup(repo, developBranch.target()); | ||
}).then(function (localDevelopCommit) { | ||
return repo.createBranch(releaseBranchName, localDevelopCommit); | ||
// If we have a sha look that up instead of the develop branch | ||
if (sha) { | ||
return NodeGit.Commit.lookup(repo, sha); | ||
} | ||
return NodeGit.Branch.lookup(repo, developBranchName, NodeGit.Branch.BRANCH.LOCAL).then(function (developBranch) { | ||
return NodeGit.Commit.lookup(repo, developBranch.target()); | ||
}); | ||
}).then(function (startingCommit) { | ||
return repo.createBranch(releaseBranchName, startingCommit); | ||
}).then(function (_releaseBranch) { | ||
@@ -77,0 +84,0 @@ releaseBranch = _releaseBranch; |
{ | ||
"name": "nodegit-flow", | ||
"version": "0.1.14", | ||
"version": "0.1.15", | ||
"description": "nodegit-flow contains gitflow methods that aren't include in the vanilla nodegit package", | ||
@@ -5,0 +5,0 @@ "main": "build/src/index.js", |
@@ -175,3 +175,3 @@ # nodegit-flow | ||
`options` is an object with a `sha` that marks the starting commit of the feature. If no sha is passed in, the feature will start at the `develop` branch. | ||
`options` is an object with a `sha` that marks the starting commit of the feature. If no `sha` is passed in, the feature will start at the `develop` branch. | ||
@@ -206,3 +206,8 @@ The name of the feature branch is the `featurePrefix` set in the git config appended with the passed in `name` parameter; | ||
### startRelease(repository, name) | ||
### startRelease(repository, name [options]) | ||
`options` Object | ||
* `sha` String | ||
`options` is an object with a `sha` that marks the starting commit of the release. If no `sha` is passed in, the release will start at the `develop` branch. | ||
The name of the release branch is the `releasePrefix` set in the git config appended with the passed in `name` parameter; | ||
@@ -209,0 +214,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
46304
908
237