Skip to content

Latest commit

 

History

History
90 lines (71 loc) · 5.2 KB

File metadata and controls

90 lines (71 loc) · 5.2 KB

Feature

All of this class' functions are attached to NodeGit.Flow or a Flow instance object

Kind: global class

feature.startFeature(featureName, options) ⇒ Branch

Starts a git flow "feature"

Kind: instance method of Feature
Returns: Branch - The nodegit branch for the feature
Async:

Param Type Description
featureName String The name of the feature to start
options Object Options for start feature

feature.finishFeature(featureName, options) ⇒ Commit

Finishes a git flow "feature"

Kind: instance method of Feature
Returns: Commit - The commit created by finishing the feature
Async:

Param Type Description
featureName String The name of the feature to finish
options Object Options for finish feature

Options:

Option Type Description
keepBranch Boolean Keep the branch after merge
isRebase Boolean Use Rebase instead of merge
preRebaseCallback Function Callback that is fired before rebase occurs, only applicable if isRebase is truthy. If the callback returns a Promise, the preRebaseCallback promise must succeed before the rebase occurs. The preRebaseCallback is called with development branch name and the feature branch name.
processMergeMessageCallback Function Callback that is fired before merge occurs, only applicable if isRebase is falsy. If the callback returns a Promise, the processMergeMessageCallback promise must succeed before the merge occurs. The result of the processMergeMessageCallback must be a string or a promise that resolves to a string, as that message will be used for the merge message. the processMergeMessageCallback will be called with the generated merge message as a parameter.
postMergeCallback Function Callback fired after a successful merge occurs.
beforeRebaseFinishCallback Function Callback that is fired right before a rebase is finished with metadata reflecting the rebase operation in full. See Rebase Branches

Feature.startFeature(repo, featureName, options) ⇒ Branch

Starts a git flow "feature"

Kind: static method of Feature
Returns: Branch - The nodegit branch for the feature
Async:

Param Type Description
repo Object The repository to start a feature in
featureName String The name of the feature to start
options Object Options for start feature

Feature.finishFeature(repo, featureName, options) ⇒ Commit

Finishes a git flow "feature"

Kind: static method of Feature
Returns: Commit - The commit created by finishing the feature
Async:

Param Type Description
repo Object The repository to finish a feature in
featureName String The name of the feature to finish
options Object Options for finish feature

Options:

Option Type Description
keepBranch Boolean Keep the branch after merge
isRebase Boolean Use Rebase instead of merge
preRebaseCallback Function Callback that is fired before rebase occurs, only applicable if isRebase is truthy. If the callback returns a Promise, the preRebaseCallback promise must succeed before the rebase occurs. The preRebaseCallback is called with development branch name and the feature branch name.
processMergeMessageCallback Function Callback that is fired before merge occurs, only applicable if isRebase is falsy. If the callback returns a Promise, the processMergeMessageCallback promise must succeed before the merge occurs. The result of the processMergeMessageCallback must be a string or a promise that resolves to a string, as that message will be used for the merge message. the processMergeMessageCallback will be called with the generated merge message as a parameter.
postMergeCallback Function Callback fired after a successful merge occurs.
beforeRebaseFinishCallback Function Callback that is fired right before a rebase is finished with metadata reflecting the rebase operation in full. See Rebase Branches