Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: j-k <[email protected]>
  • Loading branch information
JamieSlome and 06kellyjac authored Nov 20, 2024
1 parent 23b8db9 commit 0f0fc8b
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions src/proxy/processors/push-action/pullRemote.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 0f0fc8b

Please sign in to comment.