From a5fb6ebadcf10df69e0d4de1cef676d4f19272bc Mon Sep 17 00:00:00 2001 From: Jamie Slome Date: Wed, 20 Nov 2024 13:31:16 +0000 Subject: [PATCH] Apply suggestions from code review Co-authored-by: j-k --- .../processors/push-action/pullRemote.js | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/proxy/processors/push-action/pullRemote.js b/src/proxy/processors/push-action/pullRemote.js index f0cee8e5..cafb4fc7 100644 --- a/src/proxy/processors/push-action/pullRemote.js +++ b/src/proxy/processors/push-action/pullRemote.js @@ -2,7 +2,7 @@ const Step = require('../../actions').Step; const fs = require('fs'); const dir = './.remote'; const git = require('isomorphic-git'); -const http = require('isomorphic-git/http/node'); +const gitHttpClient = require('isomorphic-git/http/node'); const exec = async (req, action) => { const step = new Step('pullRemote'); @@ -31,20 +31,17 @@ const exec = async (req, action) => { await git .clone({ fs, - http, + http: gitHttpClient, url: action.url, - onAuth: () => { - return { - username: username, - password: password, - }; - }, + onAuth: () => ({ + username, + password, + }), dir: `${action.proxyGitPath}/${action.repoName}`, - }) - .then(() => { - console.log('Clone Success: ', action.url); }); + console.log('Clone Success: ', action.url); + step.log(`Completed ${cmd}`); step.setContent(`Completed ${cmd}`); } catch (e) {