Skip to content

Commit 3672b21

Browse files
Automatedidan
authored andcommitted
Latest data: Wed Apr 7 09:03:09 UTC 2021
1 parent d571101 commit 3672b21

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

dist/index.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
3333
const core = __importStar(__nccwpck_require__(2186));
3434
const github = __importStar(__nccwpck_require__(5438));
3535
const exec_1 = __nccwpck_require__(1514);
36-
const child_process_1 = __nccwpck_require__(3129);
3736
const sqlite3_1 = __importDefault(__nccwpck_require__(4946));
3837
const sqlite_1 = __nccwpck_require__(2515);
3938
const dbfile = 'github-archive.db';
@@ -58,8 +57,14 @@ async function run() {
5857
core.debug('Configured git user.name/user.email');
5958
// Create the oprhan github-meta branch if it doesn't exist
6059
const branch = core.getInput('branch');
61-
const branchExists = child_process_1.execSync(`git branch --list ${branch}`).toString().trim() !== '';
62-
if (!branchExists) {
60+
const branchExists = await exec_1.exec('git', [
61+
'fetch',
62+
'origin',
63+
branch,
64+
'--depth',
65+
'1',
66+
]);
67+
if (branchExists !== 0) {
6368
core.info(`No ${branch} branch exists, creating...`);
6469
await exec_1.exec('git', ['checkout', '--orphan', branch]);
6570
await exec_1.exec('git', ['rm', '-rf', '.']);
@@ -73,7 +78,6 @@ async function run() {
7378
else {
7479
core.info(`Checking out ${branch}`);
7580
await exec_1.exec('git', ['checkout', '-t', `origin/${branch}`]);
76-
await exec_1.exec('git', ['pull']);
7781
}
7882
// open the database
7983
const db = await sqlite_1.open({

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)