@@ -30,7 +30,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
30
30
return result;
31
31
};
32
32
Object.defineProperty(exports, "__esModule", ({ value: true }));
33
- exports.fileExistsSync = exports.existsSync = exports.directoryExistsSync = void 0;
33
+ exports.directoryExistsSync = directoryExistsSync;
34
+ exports.existsSync = existsSync;
35
+ exports.fileExistsSync = fileExistsSync;
34
36
const fs = __importStar(__nccwpck_require__(7147));
35
37
function directoryExistsSync(path, required) {
36
38
var _a;
@@ -58,7 +60,6 @@ function directoryExistsSync(path, required) {
58
60
}
59
61
throw new Error(`Directory '${path}' does not exist`);
60
62
}
61
- exports.directoryExistsSync = directoryExistsSync;
62
63
function existsSync(path) {
63
64
var _a;
64
65
if (!path) {
@@ -75,7 +76,6 @@ function existsSync(path) {
75
76
}
76
77
return true;
77
78
}
78
- exports.existsSync = existsSync;
79
79
function fileExistsSync(path) {
80
80
var _a;
81
81
if (!path) {
@@ -96,7 +96,6 @@ function fileExistsSync(path) {
96
96
}
97
97
return false;
98
98
}
99
- exports.fileExistsSync = fileExistsSync;
100
99
101
100
102
101
/***/ }),
@@ -139,7 +138,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
139
138
});
140
139
};
141
140
Object.defineProperty(exports, "__esModule", ({ value: true }));
142
- exports.createAuthHelper = void 0 ;
141
+ exports.createAuthHelper = createAuthHelper ;
143
142
const assert = __importStar(__nccwpck_require__(9491));
144
143
const core = __importStar(__nccwpck_require__(2186));
145
144
const exec = __importStar(__nccwpck_require__(1514));
@@ -156,7 +155,6 @@ const SSH_COMMAND_KEY = 'core.sshCommand';
156
155
function createAuthHelper(git, settings) {
157
156
return new GitAuthHelper(git, settings);
158
157
}
159
- exports.createAuthHelper = createAuthHelper;
160
158
class GitAuthHelper {
161
159
constructor(gitCommandManager, gitSourceSettings) {
162
160
this.insteadOfValues = [];
@@ -475,7 +473,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
475
473
});
476
474
};
477
475
Object.defineProperty(exports, "__esModule", ({ value: true }));
478
- exports.createCommandManager = exports.MinimumGitSparseCheckoutVersion = exports.MinimumGitVersion = void 0;
476
+ exports.MinimumGitSparseCheckoutVersion = exports.MinimumGitVersion = void 0;
477
+ exports.createCommandManager = createCommandManager;
479
478
const core = __importStar(__nccwpck_require__(2186));
480
479
const exec = __importStar(__nccwpck_require__(1514));
481
480
const fs = __importStar(__nccwpck_require__(7147));
@@ -496,7 +495,6 @@ function createCommandManager(workingDirectory, lfs, doSparseCheckout) {
496
495
return yield GitCommandManager.createCommandManager(workingDirectory, lfs, doSparseCheckout);
497
496
});
498
497
}
499
- exports.createCommandManager = createCommandManager;
500
498
class GitCommandManager {
501
499
// Private constructor; use createCommandManager()
502
500
constructor() {
@@ -1020,7 +1018,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
1020
1018
});
1021
1019
};
1022
1020
Object.defineProperty(exports, "__esModule", ({ value: true }));
1023
- exports.prepareExistingDirectory = void 0 ;
1021
+ exports.prepareExistingDirectory = prepareExistingDirectory ;
1024
1022
const assert = __importStar(__nccwpck_require__(9491));
1025
1023
const core = __importStar(__nccwpck_require__(2186));
1026
1024
const fs = __importStar(__nccwpck_require__(7147));
@@ -1124,7 +1122,6 @@ function prepareExistingDirectory(git, repositoryPath, repositoryUrl, clean, ref
1124
1122
}
1125
1123
});
1126
1124
}
1127
- exports.prepareExistingDirectory = prepareExistingDirectory;
1128
1125
1129
1126
1130
1127
/***/ }),
@@ -1167,7 +1164,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
1167
1164
});
1168
1165
};
1169
1166
Object.defineProperty(exports, "__esModule", ({ value: true }));
1170
- exports.cleanup = exports.getSource = void 0;
1167
+ exports.getSource = getSource;
1168
+ exports.cleanup = cleanup;
1171
1169
const core = __importStar(__nccwpck_require__(2186));
1172
1170
const fsHelper = __importStar(__nccwpck_require__(7219));
1173
1171
const gitAuthHelper = __importStar(__nccwpck_require__(2565));
@@ -1373,7 +1371,6 @@ function getSource(settings) {
1373
1371
}
1374
1372
});
1375
1373
}
1376
- exports.getSource = getSource;
1377
1374
function cleanup(repositoryPath) {
1378
1375
return __awaiter(this, void 0, void 0, function* () {
1379
1376
// Repo exists?
@@ -1409,7 +1406,6 @@ function cleanup(repositoryPath) {
1409
1406
}
1410
1407
});
1411
1408
}
1412
- exports.cleanup = cleanup;
1413
1409
function getGitCommandManager(settings) {
1414
1410
return __awaiter(this, void 0, void 0, function* () {
1415
1411
core.info(`Working directory is '${settings.repositoryPath}'`);
@@ -1548,7 +1544,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
1548
1544
});
1549
1545
};
1550
1546
Object.defineProperty(exports, "__esModule", ({ value: true }));
1551
- exports.getDefaultBranch = exports.downloadRepository = void 0;
1547
+ exports.downloadRepository = downloadRepository;
1548
+ exports.getDefaultBranch = getDefaultBranch;
1552
1549
const assert = __importStar(__nccwpck_require__(9491));
1553
1550
const core = __importStar(__nccwpck_require__(2186));
1554
1551
const fs = __importStar(__nccwpck_require__(7147));
@@ -1612,7 +1609,6 @@ function downloadRepository(authToken, owner, repo, ref, commit, repositoryPath,
1612
1609
yield io.rmRF(extractPath);
1613
1610
});
1614
1611
}
1615
- exports.downloadRepository = downloadRepository;
1616
1612
/**
1617
1613
* Looks up the default branch name
1618
1614
*/
@@ -1651,7 +1647,6 @@ function getDefaultBranch(authToken, owner, repo, baseUrl) {
1651
1647
}));
1652
1648
});
1653
1649
}
1654
- exports.getDefaultBranch = getDefaultBranch;
1655
1650
function downloadArchive(authToken, owner, repo, ref, commit, baseUrl) {
1656
1651
return __awaiter(this, void 0, void 0, function* () {
1657
1652
const octokit = github.getOctokit(authToken, {
@@ -1710,7 +1705,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
1710
1705
});
1711
1706
};
1712
1707
Object.defineProperty(exports, "__esModule", ({ value: true }));
1713
- exports.getInputs = void 0 ;
1708
+ exports.getInputs = getInputs ;
1714
1709
const core = __importStar(__nccwpck_require__(2186));
1715
1710
const fsHelper = __importStar(__nccwpck_require__(7219));
1716
1711
const github = __importStar(__nccwpck_require__(5438));
@@ -1839,7 +1834,6 @@ function getInputs() {
1839
1834
return result;
1840
1835
});
1841
1836
}
1842
- exports.getInputs = getInputs;
1843
1837
1844
1838
1845
1839
/***/ }),
@@ -1971,7 +1965,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
1971
1965
});
1972
1966
};
1973
1967
Object.defineProperty(exports, "__esModule", ({ value: true }));
1974
- exports.checkCommitInfo = exports.testRef = exports.getRefSpec = exports.getRefSpecForAllHistory = exports.getCheckoutInfo = exports.tagsRefSpec = void 0;
1968
+ exports.tagsRefSpec = void 0;
1969
+ exports.getCheckoutInfo = getCheckoutInfo;
1970
+ exports.getRefSpecForAllHistory = getRefSpecForAllHistory;
1971
+ exports.getRefSpec = getRefSpec;
1972
+ exports.testRef = testRef;
1973
+ exports.checkCommitInfo = checkCommitInfo;
1975
1974
const core = __importStar(__nccwpck_require__(2186));
1976
1975
const github = __importStar(__nccwpck_require__(5438));
1977
1976
const url_helper_1 = __nccwpck_require__(9437);
@@ -2025,7 +2024,6 @@ function getCheckoutInfo(git, ref, commit) {
2025
2024
return result;
2026
2025
});
2027
2026
}
2028
- exports.getCheckoutInfo = getCheckoutInfo;
2029
2027
function getRefSpecForAllHistory(ref, commit) {
2030
2028
const result = ['+refs/heads/*:refs/remotes/origin/*', exports.tagsRefSpec];
2031
2029
if (ref && ref.toUpperCase().startsWith('REFS/PULL/')) {
@@ -2034,7 +2032,6 @@ function getRefSpecForAllHistory(ref, commit) {
2034
2032
}
2035
2033
return result;
2036
2034
}
2037
- exports.getRefSpecForAllHistory = getRefSpecForAllHistory;
2038
2035
function getRefSpec(ref, commit) {
2039
2036
if (!ref && !commit) {
2040
2037
throw new Error('Args ref and commit cannot both be empty');
@@ -2083,7 +2080,6 @@ function getRefSpec(ref, commit) {
2083
2080
return [`+${ref}:${ref}`];
2084
2081
}
2085
2082
}
2086
- exports.getRefSpec = getRefSpec;
2087
2083
/**
2088
2084
* Tests whether the initial fetch created the ref at the expected commit
2089
2085
*/
@@ -2127,7 +2123,6 @@ function testRef(git, ref, commit) {
2127
2123
}
2128
2124
});
2129
2125
}
2130
- exports.testRef = testRef;
2131
2126
function checkCommitInfo(token, commitInfo, repositoryOwner, repositoryName, ref, commit, baseUrl) {
2132
2127
return __awaiter(this, void 0, void 0, function* () {
2133
2128
var _a;
@@ -2193,7 +2188,6 @@ function checkCommitInfo(token, commitInfo, repositoryOwner, repositoryName, ref
2193
2188
}
2194
2189
});
2195
2190
}
2196
- exports.checkCommitInfo = checkCommitInfo;
2197
2191
function fromPayload(path) {
2198
2192
return select(github.context.payload, path);
2199
2193
}
@@ -2218,13 +2212,12 @@ function select(obj, path) {
2218
2212
"use strict";
2219
2213
2220
2214
Object.defineProperty(exports, "__esModule", ({ value: true }));
2221
- exports.escape = void 0 ;
2215
+ exports.escape = escape ;
2222
2216
function escape(value) {
2223
2217
return value.replace(/[^a-zA-Z0-9_]/g, x => {
2224
2218
return `\\${x}`;
2225
2219
});
2226
2220
}
2227
- exports.escape = escape;
2228
2221
2229
2222
2230
2223
/***/ }),
@@ -2267,7 +2260,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
2267
2260
});
2268
2261
};
2269
2262
Object.defineProperty(exports, "__esModule", ({ value: true }));
2270
- exports.execute = exports.RetryHelper = void 0;
2263
+ exports.RetryHelper = void 0;
2264
+ exports.execute = execute;
2271
2265
const core = __importStar(__nccwpck_require__(2186));
2272
2266
const defaultMaxAttempts = 3;
2273
2267
const defaultMinSeconds = 10;
@@ -2319,7 +2313,6 @@ function execute(action) {
2319
2313
return yield retryHelper.execute(action);
2320
2314
});
2321
2315
}
2322
- exports.execute = execute;
2323
2316
2324
2317
2325
2318
/***/ }),
@@ -2353,7 +2346,11 @@ var __importStar = (this && this.__importStar) || function (mod) {
2353
2346
return result;
2354
2347
};
2355
2348
Object.defineProperty(exports, "__esModule", ({ value: true }));
2356
- exports.setSafeDirectory = exports.setSshKnownHostsPath = exports.setSshKeyPath = exports.setRepositoryPath = exports.SshKnownHostsPath = exports.SshKeyPath = exports.PostSetSafeDirectory = exports.RepositoryPath = exports.IsPost = void 0;
2349
+ exports.SshKnownHostsPath = exports.SshKeyPath = exports.PostSetSafeDirectory = exports.RepositoryPath = exports.IsPost = void 0;
2350
+ exports.setRepositoryPath = setRepositoryPath;
2351
+ exports.setSshKeyPath = setSshKeyPath;
2352
+ exports.setSshKnownHostsPath = setSshKnownHostsPath;
2353
+ exports.setSafeDirectory = setSafeDirectory;
2357
2354
const core = __importStar(__nccwpck_require__(2186));
2358
2355
/**
2359
2356
* Indicates whether the POST action is running
@@ -2381,28 +2378,24 @@ exports.SshKnownHostsPath = core.getState('sshKnownHostsPath');
2381
2378
function setRepositoryPath(repositoryPath) {
2382
2379
core.saveState('repositoryPath', repositoryPath);
2383
2380
}
2384
- exports.setRepositoryPath = setRepositoryPath;
2385
2381
/**
2386
2382
* Save the SSH key path so the POST action can retrieve the value.
2387
2383
*/
2388
2384
function setSshKeyPath(sshKeyPath) {
2389
2385
core.saveState('sshKeyPath', sshKeyPath);
2390
2386
}
2391
- exports.setSshKeyPath = setSshKeyPath;
2392
2387
/**
2393
2388
* Save the SSH known hosts path so the POST action can retrieve the value.
2394
2389
*/
2395
2390
function setSshKnownHostsPath(sshKnownHostsPath) {
2396
2391
core.saveState('sshKnownHostsPath', sshKnownHostsPath);
2397
2392
}
2398
- exports.setSshKnownHostsPath = setSshKnownHostsPath;
2399
2393
/**
2400
2394
* Save the set-safe-directory input so the POST action can retrieve the value.
2401
2395
*/
2402
2396
function setSafeDirectory() {
2403
2397
core.saveState('setSafeDirectory', 'true');
2404
2398
}
2405
- exports.setSafeDirectory = setSafeDirectory;
2406
2399
// Publish a variable so that when the POST action runs, it can determine it should run the cleanup logic.
2407
2400
// This is necessary since we don't have a separate entry point.
2408
2401
if (!exports.IsPost) {
@@ -2441,7 +2434,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
2441
2434
return result;
2442
2435
};
2443
2436
Object.defineProperty(exports, "__esModule", ({ value: true }));
2444
- exports.isGhes = exports.getServerApiUrl = exports.getServerUrl = exports.getFetchUrl = void 0;
2437
+ exports.getFetchUrl = getFetchUrl;
2438
+ exports.getServerUrl = getServerUrl;
2439
+ exports.getServerApiUrl = getServerApiUrl;
2440
+ exports.isGhes = isGhes;
2445
2441
const assert = __importStar(__nccwpck_require__(9491));
2446
2442
const url_1 = __nccwpck_require__(7310);
2447
2443
function getFetchUrl(settings) {
@@ -2457,14 +2453,12 @@ function getFetchUrl(settings) {
2457
2453
// "origin" is SCHEME://HOSTNAME[:PORT]
2458
2454
return `${serviceUrl.origin}/${encodedOwner}/${encodedName}`;
2459
2455
}
2460
- exports.getFetchUrl = getFetchUrl;
2461
2456
function getServerUrl(url) {
2462
2457
let urlValue = url && url.trim().length > 0
2463
2458
? url
2464
2459
: process.env['GITHUB_SERVER_URL'] || 'https://github.com';
2465
2460
return new url_1.URL(urlValue);
2466
2461
}
2467
- exports.getServerUrl = getServerUrl;
2468
2462
function getServerApiUrl(url) {
2469
2463
let apiUrl = 'https://api.github.com';
2470
2464
if (isGhes(url)) {
@@ -2473,12 +2467,10 @@ function getServerApiUrl(url) {
2473
2467
}
2474
2468
return apiUrl;
2475
2469
}
2476
- exports.getServerApiUrl = getServerApiUrl;
2477
2470
function isGhes(url) {
2478
2471
const ghUrl = getServerUrl(url);
2479
2472
return ghUrl.hostname.toUpperCase() !== 'github.com';
2480
2473
}
2481
- exports.isGhes = isGhes;
2482
2474
2483
2475
2484
2476
/***/ }),
@@ -2521,7 +2513,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
2521
2513
});
2522
2514
};
2523
2515
Object.defineProperty(exports, "__esModule", ({ value: true }));
2524
- exports.getOrganizationId = void 0 ;
2516
+ exports.getOrganizationId = getOrganizationId ;
2525
2517
const core = __importStar(__nccwpck_require__(2186));
2526
2518
const fs = __importStar(__nccwpck_require__(7147));
2527
2519
/**
@@ -2550,7 +2542,6 @@ function getOrganizationId() {
2550
2542
}
2551
2543
});
2552
2544
}
2553
- exports.getOrganizationId = getOrganizationId;
2554
2545
2555
2546
2556
2547
/***/ }),
0 commit comments