sync-to-github
Advanced tools
Comparing version 0.0.6 to 0.0.7
@@ -60,6 +60,10 @@ var GitHubApi = require('github'); | ||
return commitChanges(gitData, options, commit, newRootTree); | ||
}).then(function() { | ||
if (options.pullToBranch) { | ||
return createPullRequest(github, options); | ||
} | ||
}); | ||
}); | ||
}).then(function() { | ||
debug('Sync to github complete!'); | ||
debug(options, 'Sync to github complete!'); | ||
}); | ||
@@ -140,3 +144,3 @@ } | ||
* Create a convenient wrapper around the `gitdata` endpoint for the github api, | ||
* that automatically passed the user and repo and is promisified. | ||
* that automatically passes the user and repo and is promisified. | ||
* | ||
@@ -152,2 +156,3 @@ * @param github {GitHubApi} | ||
return function gitData(name, params) { | ||
// Promisified methods by default have `Async` appended to their names. | ||
var method = gitdata[name + 'Async']; | ||
@@ -159,2 +164,4 @@ var realParams = _.merge({ | ||
var loggedParams = _.merge({}, params); | ||
// We use this client to send blobs and sometimes they are big; | ||
// avoid dumping blob content to log. | ||
if (typeof(loggedParams.content) === 'string') { | ||
@@ -338,6 +345,2 @@ loggedParams.content = | ||
}); | ||
}).then(function() { | ||
if (options.pullToBranch) { | ||
return createPullRequest(github, options); | ||
} | ||
}); | ||
@@ -367,3 +370,4 @@ } | ||
* @returns {Promise<Object[]>} Trees from root to the deepest existing | ||
* component of `pathParts`. Will have a length <= `pathParts.length` | ||
* component of `pathParts`. Will have a length <= `pathParts.length + 1` | ||
* because it will also contain the root tree (`pathParts` does not). | ||
*/ | ||
@@ -370,0 +374,0 @@ function existingTreesForPath(gitData, rootTree, pathParts, treeCache) { |
{ | ||
"name": "sync-to-github", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"description": "Easily sync a directory of files to a GitHub repo using the GitHub API", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
18125
418