You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
assert.ok(repositoryPath, 'Expected repositoryPath to be defined');
7267
+
assert.ok(repositoryUrl, 'Expected repositoryUrl to be defined');
7268
+
// Indicates whether to delete the directory contents
7241
7269
let remove = false;
7242
7270
// Check whether using git or REST API
7243
7271
if (!git) {
@@ -7263,6 +7291,7 @@ function prepareExistingDirectory(git, repositoryPath, repositoryUrl, clean) {
7263
7291
}
7264
7292
}
7265
7293
try {
7294
+
core.startGroup('Removing previously created refs, to avoid conflicts');
7266
7295
// Checkout detached HEAD
7267
7296
if (!(yield git.isDetached())) {
7268
7297
yield git.checkoutDetach();
@@ -7277,15 +7306,18 @@ function prepareExistingDirectory(git, repositoryPath, repositoryUrl, clean) {
7277
7306
for (const branch of branches) {
7278
7307
yield git.branchDelete(true, branch);
7279
7308
}
7309
+
core.endGroup();
7280
7310
// Clean
7281
7311
if (clean) {
7312
+
core.startGroup('Cleaning the repository');
7282
7313
if (!(yield git.tryClean())) {
7283
7314
core.debug(`The clean command failed. This might be caused by: 1) path too long, 2) permission issue, or 3) file in use. For futher investigation, manually run 'git clean -ffdx' on the directory '${repositoryPath}'.`);
7284
7315
remove = true;
7285
7316
}
7286
7317
else if (!(yield git.tryReset())) {
7287
7318
remove = true;
7288
7319
}
7320
+
core.endGroup();
7289
7321
if (remove) {
7290
7322
core.warning(`Unable to clean or reset the repository. The repository will be recreated instead.`);
assert.ok(repositoryPath,'Expected repositoryPath to be defined')
17
+
assert.ok(repositoryUrl,'Expected repositoryUrl to be defined')
18
+
19
+
// Indicates whether to delete the directory contents
14
20
letremove=false
15
21
16
22
// Check whether using git or REST API
@@ -38,6 +44,7 @@ export async function prepareExistingDirectory(
38
44
}
39
45
40
46
try{
47
+
core.startGroup('Removing previously created refs, to avoid conflicts')
41
48
// Checkout detached HEAD
42
49
if(!(awaitgit.isDetached())){
43
50
awaitgit.checkoutDetach()
@@ -54,9 +61,11 @@ export async function prepareExistingDirectory(
54
61
for(constbranchofbranches){
55
62
awaitgit.branchDelete(true,branch)
56
63
}
64
+
core.endGroup()
57
65
58
66
// Clean
59
67
if(clean){
68
+
core.startGroup('Cleaning the repository')
60
69
if(!(awaitgit.tryClean())){
61
70
core.debug(
62
71
`The clean command failed. This might be caused by: 1) path too long, 2) permission issue, or 3) file in use. For futher investigation, manually run 'git clean -ffdx' on the directory '${repositoryPath}'.`
@@ -65,6 +74,7 @@ export async function prepareExistingDirectory(
0 commit comments