From 3e543a3ee0aaadfacfd03b6583f277269e7a016e Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Tue, 12 Jan 2021 13:08:45 +0100 Subject: [PATCH] test only git --- Client/httpInterface.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Client/httpInterface.js b/Client/httpInterface.js index 12c8935fc..510427de3 100644 --- a/Client/httpInterface.js +++ b/Client/httpInterface.js @@ -611,7 +611,7 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE update() async function update() { - await doGithub() + //await doGithub() let message = await doGit() let customResponse = { @@ -631,9 +631,9 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE }) const repo = 'Superalgos' - const owner = 'Superalgos' - const head = 'in-app-documentation' - const base = username + ':in-app-documentation' + const owner = username + const head = 'upstream/in-app-documentation' + const base = 'in-app-documentation' const commitMessage = 'Update: ' + message try { @@ -658,7 +658,9 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE } const git = simpleGit(options) - await git.pull((err, update) => { + return await git.pull('upstream', 'in-app-documentation', onPull) + + function onPull(err, update) { if (update) { if (update.summary.changes) { return 'New Version Found' @@ -672,7 +674,7 @@ exports.newHttpInterface = function newHttpInterface(WEB_SERVER, DATA_FILE_SERVE return 'Not Updated' } } - }) + } } } catch (err) {