Skip to content

Commit

Permalink
node 16 test
Browse files Browse the repository at this point in the history
  • Loading branch information
p4p1 committed Jul 23, 2023
1 parent 84a59b2 commit d42476c
Show file tree
Hide file tree
Showing 3 changed files with 233 additions and 34 deletions.
9 changes: 4 additions & 5 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8515,20 +8515,19 @@ const dlImg = (async (githubToken, filePath, username) => {
'user.email',
committerEmail,
]);
console.log(committerEmail);
console.log(committerUsername);
console.log(commitMessage);
await exec('git', ['config', '--global', 'user.name', committerUsername]);
if (githubToken) {
await exec('git', ['remote', 'set-url', 'origin',
`https://${githubToken}@github.com/${process.env.GITHUB_REPOSITORY}.git`]);
}
await exec('git', ['add', filePath]);
await exec('git', ['commit', '-m', commitMessage]);
await exec('git', ['add', filePath]);
await exec('git', ['push']);
});

dlImg(GITHUB_TOKEN, FILEPATH, THM_USERNAME);
dlImg(GITHUB_TOKEN, FILEPATH, THM_USERNAME).catch((error) => {
console.log('nothing to commit');
});

})();

Expand Down
Loading

0 comments on commit d42476c

Please sign in to comment.