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

14
dist/setup/index.js vendored
View file

@ -91648,11 +91648,19 @@ exports.findReleaseFromManifest = findReleaseFromManifest;
function getManifest() {
return __awaiter(this, void 0, void 0, function* () {
try {
// const manifestFromRepo = await getManifestFromRepo();
const manifestFromRepo = null;
//const manifestFromRepo = await getManifestFromRepo();
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(`Manifest from repo: ${JSON.stringify(manifestFromRepo)}`);
if (!Array.isArray(manifestFromRepo)) {
if (!Array.isArray(manifestFromRepo) ||
!manifestFromRepo.every(isValidManifestEntry)) {
throw new Error('Invalid response');
}
return manifestFromRepo;

View file

@ -35,11 +35,22 @@ export async function findReleaseFromManifest(
export async function getManifest(): Promise<tc.IToolRelease[]> {
try {
// const manifestFromRepo = await getManifestFromRepo();
const manifestFromRepo = null;
//const manifestFromRepo = await getManifestFromRepo();
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(`Manifest from repo: ${JSON.stringify(manifestFromRepo)}`);
if (!Array.isArray(manifestFromRepo)) {
if (
!Array.isArray(manifestFromRepo) ||
!manifestFromRepo.every(isValidManifestEntry)
) {
throw new Error('Invalid response');
}
return manifestFromRepo;