@@ -30,7 +30,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
3030 return result;
3131};
3232Object.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;
3436const fs = __importStar(__nccwpck_require__(7147));
3537function directoryExistsSync(path, required) {
3638 var _a;
@@ -58,7 +60,6 @@ function directoryExistsSync(path, required) {
5860 }
5961 throw new Error(`Directory '${path}' does not exist`);
6062}
61- exports.directoryExistsSync = directoryExistsSync;
6263function existsSync(path) {
6364 var _a;
6465 if (!path) {
@@ -75,7 +76,6 @@ function existsSync(path) {
7576 }
7677 return true;
7778}
78- exports.existsSync = existsSync;
7979function fileExistsSync(path) {
8080 var _a;
8181 if (!path) {
@@ -96,7 +96,6 @@ function fileExistsSync(path) {
9696 }
9797 return false;
9898}
99- exports.fileExistsSync = fileExistsSync;
10099
101100
102101/***/ }),
@@ -139,7 +138,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
139138 });
140139};
141140Object.defineProperty(exports, "__esModule", ({ value: true }));
142- exports.createAuthHelper = void 0 ;
141+ exports.createAuthHelper = createAuthHelper ;
143142const assert = __importStar(__nccwpck_require__(9491));
144143const core = __importStar(__nccwpck_require__(2186));
145144const exec = __importStar(__nccwpck_require__(1514));
@@ -156,7 +155,6 @@ const SSH_COMMAND_KEY = 'core.sshCommand';
156155function createAuthHelper(git, settings) {
157156 return new GitAuthHelper(git, settings);
158157}
159- exports.createAuthHelper = createAuthHelper;
160158class GitAuthHelper {
161159 constructor(gitCommandManager, gitSourceSettings) {
162160 this.insteadOfValues = [];
@@ -475,7 +473,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
475473 });
476474};
477475Object.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;
479478const core = __importStar(__nccwpck_require__(2186));
480479const exec = __importStar(__nccwpck_require__(1514));
481480const fs = __importStar(__nccwpck_require__(7147));
@@ -496,7 +495,6 @@ function createCommandManager(workingDirectory, lfs, doSparseCheckout) {
496495 return yield GitCommandManager.createCommandManager(workingDirectory, lfs, doSparseCheckout);
497496 });
498497}
499- exports.createCommandManager = createCommandManager;
500498class GitCommandManager {
501499 // Private constructor; use createCommandManager()
502500 constructor() {
@@ -1020,7 +1018,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10201018 });
10211019};
10221020Object.defineProperty(exports, "__esModule", ({ value: true }));
1023- exports.prepareExistingDirectory = void 0 ;
1021+ exports.prepareExistingDirectory = prepareExistingDirectory ;
10241022const assert = __importStar(__nccwpck_require__(9491));
10251023const core = __importStar(__nccwpck_require__(2186));
10261024const fs = __importStar(__nccwpck_require__(7147));
@@ -1124,7 +1122,6 @@ function prepareExistingDirectory(git, repositoryPath, repositoryUrl, clean, ref
11241122 }
11251123 });
11261124}
1127- exports.prepareExistingDirectory = prepareExistingDirectory;
11281125
11291126
11301127/***/ }),
@@ -1167,7 +1164,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11671164 });
11681165};
11691166Object.defineProperty(exports, "__esModule", ({ value: true }));
1170- exports.cleanup = exports.getSource = void 0;
1167+ exports.getSource = getSource;
1168+ exports.cleanup = cleanup;
11711169const core = __importStar(__nccwpck_require__(2186));
11721170const fsHelper = __importStar(__nccwpck_require__(7219));
11731171const gitAuthHelper = __importStar(__nccwpck_require__(2565));
@@ -1373,7 +1371,6 @@ function getSource(settings) {
13731371 }
13741372 });
13751373}
1376- exports.getSource = getSource;
13771374function cleanup(repositoryPath) {
13781375 return __awaiter(this, void 0, void 0, function* () {
13791376 // Repo exists?
@@ -1409,7 +1406,6 @@ function cleanup(repositoryPath) {
14091406 }
14101407 });
14111408}
1412- exports.cleanup = cleanup;
14131409function getGitCommandManager(settings) {
14141410 return __awaiter(this, void 0, void 0, function* () {
14151411 core.info(`Working directory is '${settings.repositoryPath}'`);
@@ -1548,7 +1544,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
15481544 });
15491545};
15501546Object.defineProperty(exports, "__esModule", ({ value: true }));
1551- exports.getDefaultBranch = exports.downloadRepository = void 0;
1547+ exports.downloadRepository = downloadRepository;
1548+ exports.getDefaultBranch = getDefaultBranch;
15521549const assert = __importStar(__nccwpck_require__(9491));
15531550const core = __importStar(__nccwpck_require__(2186));
15541551const fs = __importStar(__nccwpck_require__(7147));
@@ -1612,7 +1609,6 @@ function downloadRepository(authToken, owner, repo, ref, commit, repositoryPath,
16121609 yield io.rmRF(extractPath);
16131610 });
16141611}
1615- exports.downloadRepository = downloadRepository;
16161612/**
16171613 * Looks up the default branch name
16181614 */
@@ -1651,7 +1647,6 @@ function getDefaultBranch(authToken, owner, repo, baseUrl) {
16511647 }));
16521648 });
16531649}
1654- exports.getDefaultBranch = getDefaultBranch;
16551650function downloadArchive(authToken, owner, repo, ref, commit, baseUrl) {
16561651 return __awaiter(this, void 0, void 0, function* () {
16571652 const octokit = github.getOctokit(authToken, {
@@ -1710,7 +1705,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
17101705 });
17111706};
17121707Object.defineProperty(exports, "__esModule", ({ value: true }));
1713- exports.getInputs = void 0 ;
1708+ exports.getInputs = getInputs ;
17141709const core = __importStar(__nccwpck_require__(2186));
17151710const fsHelper = __importStar(__nccwpck_require__(7219));
17161711const github = __importStar(__nccwpck_require__(5438));
@@ -1839,7 +1834,6 @@ function getInputs() {
18391834 return result;
18401835 });
18411836}
1842- exports.getInputs = getInputs;
18431837
18441838
18451839/***/ }),
@@ -1971,7 +1965,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
19711965 });
19721966};
19731967Object.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;
19751974const core = __importStar(__nccwpck_require__(2186));
19761975const github = __importStar(__nccwpck_require__(5438));
19771976const url_helper_1 = __nccwpck_require__(9437);
@@ -2025,7 +2024,6 @@ function getCheckoutInfo(git, ref, commit) {
20252024 return result;
20262025 });
20272026}
2028- exports.getCheckoutInfo = getCheckoutInfo;
20292027function getRefSpecForAllHistory(ref, commit) {
20302028 const result = ['+refs/heads/*:refs/remotes/origin/*', exports.tagsRefSpec];
20312029 if (ref && ref.toUpperCase().startsWith('REFS/PULL/')) {
@@ -2034,7 +2032,6 @@ function getRefSpecForAllHistory(ref, commit) {
20342032 }
20352033 return result;
20362034}
2037- exports.getRefSpecForAllHistory = getRefSpecForAllHistory;
20382035function getRefSpec(ref, commit) {
20392036 if (!ref && !commit) {
20402037 throw new Error('Args ref and commit cannot both be empty');
@@ -2083,7 +2080,6 @@ function getRefSpec(ref, commit) {
20832080 return [`+${ref}:${ref}`];
20842081 }
20852082}
2086- exports.getRefSpec = getRefSpec;
20872083/**
20882084 * Tests whether the initial fetch created the ref at the expected commit
20892085 */
@@ -2127,7 +2123,6 @@ function testRef(git, ref, commit) {
21272123 }
21282124 });
21292125}
2130- exports.testRef = testRef;
21312126function checkCommitInfo(token, commitInfo, repositoryOwner, repositoryName, ref, commit, baseUrl) {
21322127 return __awaiter(this, void 0, void 0, function* () {
21332128 var _a;
@@ -2193,7 +2188,6 @@ function checkCommitInfo(token, commitInfo, repositoryOwner, repositoryName, ref
21932188 }
21942189 });
21952190}
2196- exports.checkCommitInfo = checkCommitInfo;
21972191function fromPayload(path) {
21982192 return select(github.context.payload, path);
21992193}
@@ -2218,13 +2212,12 @@ function select(obj, path) {
22182212"use strict";
22192213
22202214Object.defineProperty(exports, "__esModule", ({ value: true }));
2221- exports.escape = void 0 ;
2215+ exports.escape = escape ;
22222216function escape(value) {
22232217 return value.replace(/[^a-zA-Z0-9_]/g, x => {
22242218 return `\\${x}`;
22252219 });
22262220}
2227- exports.escape = escape;
22282221
22292222
22302223/***/ }),
@@ -2267,7 +2260,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
22672260 });
22682261};
22692262Object.defineProperty(exports, "__esModule", ({ value: true }));
2270- exports.execute = exports.RetryHelper = void 0;
2263+ exports.RetryHelper = void 0;
2264+ exports.execute = execute;
22712265const core = __importStar(__nccwpck_require__(2186));
22722266const defaultMaxAttempts = 3;
22732267const defaultMinSeconds = 10;
@@ -2319,7 +2313,6 @@ function execute(action) {
23192313 return yield retryHelper.execute(action);
23202314 });
23212315}
2322- exports.execute = execute;
23232316
23242317
23252318/***/ }),
@@ -2353,7 +2346,11 @@ var __importStar = (this && this.__importStar) || function (mod) {
23532346 return result;
23542347};
23552348Object.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;
23572354const core = __importStar(__nccwpck_require__(2186));
23582355/**
23592356 * Indicates whether the POST action is running
@@ -2381,28 +2378,24 @@ exports.SshKnownHostsPath = core.getState('sshKnownHostsPath');
23812378function setRepositoryPath(repositoryPath) {
23822379 core.saveState('repositoryPath', repositoryPath);
23832380}
2384- exports.setRepositoryPath = setRepositoryPath;
23852381/**
23862382 * Save the SSH key path so the POST action can retrieve the value.
23872383 */
23882384function setSshKeyPath(sshKeyPath) {
23892385 core.saveState('sshKeyPath', sshKeyPath);
23902386}
2391- exports.setSshKeyPath = setSshKeyPath;
23922387/**
23932388 * Save the SSH known hosts path so the POST action can retrieve the value.
23942389 */
23952390function setSshKnownHostsPath(sshKnownHostsPath) {
23962391 core.saveState('sshKnownHostsPath', sshKnownHostsPath);
23972392}
2398- exports.setSshKnownHostsPath = setSshKnownHostsPath;
23992393/**
24002394 * Save the set-safe-directory input so the POST action can retrieve the value.
24012395 */
24022396function setSafeDirectory() {
24032397 core.saveState('setSafeDirectory', 'true');
24042398}
2405- exports.setSafeDirectory = setSafeDirectory;
24062399// Publish a variable so that when the POST action runs, it can determine it should run the cleanup logic.
24072400// This is necessary since we don't have a separate entry point.
24082401if (!exports.IsPost) {
@@ -2441,7 +2434,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
24412434 return result;
24422435};
24432436Object.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;
24452441const assert = __importStar(__nccwpck_require__(9491));
24462442const url_1 = __nccwpck_require__(7310);
24472443function getFetchUrl(settings) {
@@ -2457,14 +2453,12 @@ function getFetchUrl(settings) {
24572453 // "origin" is SCHEME://HOSTNAME[:PORT]
24582454 return `${serviceUrl.origin}/${encodedOwner}/${encodedName}`;
24592455}
2460- exports.getFetchUrl = getFetchUrl;
24612456function getServerUrl(url) {
24622457 let urlValue = url && url.trim().length > 0
24632458 ? url
24642459 : process.env['GITHUB_SERVER_URL'] || 'https://github.com';
24652460 return new url_1.URL(urlValue);
24662461}
2467- exports.getServerUrl = getServerUrl;
24682462function getServerApiUrl(url) {
24692463 let apiUrl = 'https://api.github.com';
24702464 if (isGhes(url)) {
@@ -2473,12 +2467,10 @@ function getServerApiUrl(url) {
24732467 }
24742468 return apiUrl;
24752469}
2476- exports.getServerApiUrl = getServerApiUrl;
24772470function isGhes(url) {
24782471 const ghUrl = getServerUrl(url);
24792472 return ghUrl.hostname.toUpperCase() !== 'GITHUB.COM';
24802473}
2481- exports.isGhes = isGhes;
24822474
24832475
24842476/***/ }),
@@ -2521,7 +2513,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
25212513 });
25222514};
25232515Object.defineProperty(exports, "__esModule", ({ value: true }));
2524- exports.getOrganizationId = void 0 ;
2516+ exports.getOrganizationId = getOrganizationId ;
25252517const core = __importStar(__nccwpck_require__(2186));
25262518const fs = __importStar(__nccwpck_require__(7147));
25272519/**
@@ -2550,7 +2542,6 @@ function getOrganizationId() {
25502542 }
25512543 });
25522544}
2553- exports.getOrganizationId = getOrganizationId;
25542545
25552546
25562547/***/ }),
0 commit comments