Skip to content

Commit 17ed4d8

Browse files
test
1 parent 09c62e5 commit 17ed4d8

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/utils/command.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ exports.clone = (context) => __awaiter(this, void 0, void 0, function* () {
2121
const url = misc_1.getGitUrl(context);
2222
const depth = misc_1.getCloneDepth();
2323
const workspace = misc_1.getWorkspace();
24-
yield execAsync(`git -C ${workspace} clone --depth=${depth} --branch=master ${url} .`);
24+
yield execAsync(`git -C ${workspace} clone --depth=${depth} ${url} .`);
25+
yield execAsync(`git -C ${workspace} fetch origin ${context.ref}`);
2526
signale_1.default.info(yield execAsync('ls -lat'));
2627
yield execAsync(`git -C ${workspace} checkout -qf ${context.sha}`);
2728
});

src/utils/command.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ export const clone = async (context: Context) => {
88
const url = getGitUrl(context);
99
const depth = getCloneDepth();
1010
const workspace = getWorkspace();
11-
await execAsync(`git -C ${workspace} clone --depth=${depth} --branch=master ${url} .`);
11+
await execAsync(`git -C ${workspace} clone --depth=${depth} ${url} .`);
12+
await execAsync(`git -C ${workspace} fetch origin ${context.ref}`);
1213
await execAsync(`git -C ${workspace} checkout -qf ${context.sha}`);
1314
};
1415

0 commit comments

Comments
 (0)