You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.2 KiB
JavaScript
42 lines
1.2 KiB
JavaScript
fetch('/up.json')
|
|
.then(r => r.json())
|
|
.then(json => {
|
|
for (const id of json) {
|
|
fetch(`https://api.github.com/repos/Plume-org/Plume/pulls/${id}`, { mode: 'cors' })
|
|
.then(r => r.json())
|
|
.catch(() => {
|
|
return {
|
|
title: ''
|
|
}
|
|
})
|
|
.then(json => {
|
|
const linkTest = document.createElement('a')
|
|
linkTest.href = `https://pr-${id}.joinplu.me/`
|
|
linkTest.innerText = `#${id}: ${json.title || ''}`
|
|
const linkLogs = document.createElement('a')
|
|
linkLogs.href = `/log_viewer?${id}`
|
|
linkLogs.innerText = 'View logs'
|
|
const linkGitHub = document.createElement('a')
|
|
linkGitHub.href = `https://github.com/Plume-org/Plume/pull/${id}`
|
|
linkGitHub.innerText = 'View on Github'
|
|
|
|
const pTest = document.createElement('p')
|
|
pTest.classList.add('grow')
|
|
pTest.appendChild(linkTest)
|
|
const pLogs = document.createElement('p')
|
|
pLogs.appendChild(linkLogs);
|
|
const pGitHub = document.createElement('p')
|
|
pGitHub.appendChild(linkGitHub)
|
|
|
|
const li = document.createElement('li')
|
|
li.appendChild(pTest)
|
|
li.appendChild(pLogs)
|
|
li.append(' — ')
|
|
li.appendChild(pGitHub)
|
|
li.classList.add('flex')
|
|
document.getElementById('list').appendChild(li)
|
|
})
|
|
}
|
|
})
|
|
|