in custom/cve5/asfpreload.js [78:154]
async function loadProjectUrl(pmc) {
var url = ""
try {
const abortController = new AbortController()
setTimeout(() => abortController.abort(), 5000)
var response = await fetch('https://whimsy.apache.org/public/committee-info.json', {
method: 'GET',
credentials: 'omit',
headers: {
'Accept': 'application/json, text/plain, */*'
},
redirect: 'error',
signal: abortController.signal
});
if (!response.ok) {
return url
} else {
var res = await response.json();
if (res.committees && res.committees[pmc]) {
url = res.committees[pmc].site
return url.replace('http:','https:')
}
}
} catch (error) {
return url
}
/* If that failed, see if it retired */
try {
const abortController = new AbortController()
setTimeout(() => abortController.abort(), 5000)
var response = await fetch('https://whimsy.apache.org/public/committee-retired.json', {
method: 'GET',
credentials: 'omit',
headers: {
'Accept': 'application/json, text/plain, */*'
},
redirect: 'error',
signal: abortController.signal
});
if (!response.ok) {
return url
} else {
var res = await response.json();
if (res.retired && res.retired[pmc]) {
url = 'https://attic.apache.org/projects/' + pmc + '.html'
return url
}
}
} catch (error) {
return url
}
/* If that failed, try the podlings */
try {
const abortController = new AbortController()
setTimeout(() => abortController.abort(), 5000)
var response = await fetch('https://whimsy.apache.org/public/public_podlings.json', {
method: 'GET',
credentials: 'omit',
headers: {
'Accept': 'application/json, text/plain, */*'
},
redirect: 'error',
signal: abortController.signal
});
if (!response.ok) {
return url
} else {
var res = await response.json();
if (res.podling && res.podling[pmc] && res.podling[pmc].podlingStatus && res.podling[pmc].podlingStatus.website) {
url = res.podling[pmc].podlingStatus.website
return url.replace('http:','https:')
}
}
} catch (error) {
return url
}
}