testing with different input

This commit is contained in:
mahabaleshwars 2024-09-24 15:56:55 +05:30
parent 658d90b402
commit da830ea0e9
2 changed files with 25 additions and 6 deletions

12
dist/setup/index.js vendored
View File

@ -91649,10 +91649,18 @@ function getManifest() {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
try { try {
//const manifestFromRepo = await getManifestFromRepo(); //const manifestFromRepo = await getManifestFromRepo();
const manifestFromRepo = null; const manifestFromRepo = {
sha: '5418fd77743bd877e972056787b3ee67a5725566',
node_id: 'MDQ6QmxvYjI1MDA3NzkzMzo1NDE4ZmQ3Nzc0M2JkODc3ZTk3MjA1Njc4N2IzZWU2N2E1NzI1NTY2',
size: 296984,
url: 'https://api.github.com/repos/actions/python-versions/git/blobs/5418fd77743bd877e972056787b3ee67a5725566',
content: 'fasfWfasdkjnflaknc@fakjsdhfjlakjlkfj',
encoding: 'base64'
};
core.info('Successfully fetched the manifest from the repo.'); core.info('Successfully fetched the manifest from the repo.');
core.info(`Manifest from repo: ${JSON.stringify(manifestFromRepo)}`); core.info(`Manifest from repo: ${JSON.stringify(manifestFromRepo)}`);
if (!Array.isArray(manifestFromRepo)) { if (!Array.isArray(manifestFromRepo) ||
!manifestFromRepo.every(isValidManifestEntry)) {
throw new Error('Invalid response'); throw new Error('Invalid response');
} }
return manifestFromRepo; return manifestFromRepo;

View File

@ -36,10 +36,21 @@ export async function findReleaseFromManifest(
export async function getManifest(): Promise<tc.IToolRelease[]> { export async function getManifest(): Promise<tc.IToolRelease[]> {
try { try {
//const manifestFromRepo = await getManifestFromRepo(); //const manifestFromRepo = await getManifestFromRepo();
const manifestFromRepo = null; const manifestFromRepo = {
sha: '5418fd77743bd877e972056787b3ee67a5725566',
node_id:
'MDQ6QmxvYjI1MDA3NzkzMzo1NDE4ZmQ3Nzc0M2JkODc3ZTk3MjA1Njc4N2IzZWU2N2E1NzI1NTY2',
size: 296984,
url: 'https://api.github.com/repos/actions/python-versions/git/blobs/5418fd77743bd877e972056787b3ee67a5725566',
content: 'fasfWfasdkjnflaknc@fakjsdhfjlakjlkfj',
encoding: 'base64'
};
core.info('Successfully fetched the manifest from the repo.'); core.info('Successfully fetched the manifest from the repo.');
core.info(`Manifest from repo: ${JSON.stringify(manifestFromRepo)}`); core.info(`Manifest from repo: ${JSON.stringify(manifestFromRepo)}`);
if (!Array.isArray(manifestFromRepo)) { if (
!Array.isArray(manifestFromRepo) ||
!manifestFromRepo.every(isValidManifestEntry)
) {
throw new Error('Invalid response'); throw new Error('Invalid response');
} }
return manifestFromRepo; return manifestFromRepo;