swap to paperlink direct link

This commit is contained in:
taah 2022-06-19 13:27:37 -07:00
parent ed45e29823
commit d8bd1efdd7
2 changed files with 10 additions and 2 deletions

View File

@ -48,7 +48,7 @@ const DownloadPage = () => {
<ul className={"builds"}> <ul className={"builds"}>
{jobs.get(Array.from(jobs.keys()).filter(value => value.name === version)[0])?.map(value => { {jobs.get(Array.from(jobs.keys()).filter(value => value.name === version)[0])?.map(value => {
return <li> return <li>
<Button href={value.url}>#{value.number}</Button> <Button href={value.artifact ? `${value.url}/artifact/${value.artifact}` : value.url}>#{value.number}</Button>
<ul className={`changes-${value.number}`}> <ul className={`changes-${value.number}`}>
{value.changes?.map(value1 => { {value.changes?.map(value1 => {
return <li>[<a href={`https://github.com/AtlasMediaGroup/Scissors/commit/${value1.id}`}>{value1.id}</a>]&nbsp;&nbsp;{value1.comment}</li> return <li>[<a href={`https://github.com/AtlasMediaGroup/Scissors/commit/${value1.id}`}>{value1.id}</a>]&nbsp;&nbsp;{value1.comment}</li>

View File

@ -12,7 +12,8 @@ export type Build = {
number: number, number: number,
url: string, url: string,
changes?: BuildChange[], changes?: BuildChange[],
timestamp?: number timestamp?: number,
artifact?: string
} }
export type BuildChange = { export type BuildChange = {
@ -49,6 +50,13 @@ export function getBuilds(version: string): Promise<Build[]> {
change.id = change.id.substring(0, 7) change.id = change.id.substring(0, 7)
} }
build.changes = changes build.changes = changes
if (value1.data.artifacts) {
let artifacts: any[] = value1.data.artifacts
if (artifacts.length > 0) {
build.artifact = value1.data.artifacts[0].relativePath
}
}
count++; count++;
if (count === builds.length - 1) { if (count === builds.length - 1) {
resolve(builds) resolve(builds)