Skip to content

Commit e2a6fcf

Browse files
authored
fix: better usage of simple git to assure asynchronous operations (#3)
1 parent 7450f61 commit e2a6fcf

File tree

2 files changed

+12
-14
lines changed

2 files changed

+12
-14
lines changed

dist/index.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6107,13 +6107,12 @@ async function push(token, url, branchName, message, committerUsername, committe
61076107

61086108
if (core.isDebug()) __webpack_require__(231).enable('simple-git');
61096109

6110-
return await git
6111-
.add('./*')
6112-
.addConfig('user.name', committerUsername)
6113-
.addConfig('user.email', committerEmail)
6114-
.commit(message)
6115-
.addRemote('auth', authanticatedUrl(token, url, committerUsername))
6116-
.push(['-u', 'auth', branchName]);
6110+
await git.add('./*');
6111+
await git.addConfig('user.name', committerUsername);
6112+
await git.addConfig('user.email', committerEmail);
6113+
await git.commit(message);
6114+
await git.addRemote('auth', authanticatedUrl(token, url, committerUsername));
6115+
await git.push(['-u', 'auth', branchName]);
61176116
}
61186117

61196118

lib/git.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,11 @@ async function push(token, url, branchName, message, committerUsername, committe
2020

2121
if (core.isDebug()) require('debug').enable('simple-git');
2222

23-
return await git
24-
.add('./*')
25-
.addConfig('user.name', committerUsername)
26-
.addConfig('user.email', committerEmail)
27-
.commit(message)
28-
.addRemote('auth', authanticatedUrl(token, url, committerUsername))
29-
.push(['-u', 'auth', branchName]);
23+
await git.add('./*');
24+
await git.addConfig('user.name', committerUsername);
25+
await git.addConfig('user.email', committerEmail);
26+
await git.commit(message);
27+
await git.addRemote('auth', authanticatedUrl(token, url, committerUsername));
28+
await git.push(['-u', 'auth', branchName]);
3029
}
3130

0 commit comments

Comments
 (0)