mirror of
https://github.com/AtlasMediaGroup/Scissors-Website.git
synced 2024-11-05 17:16:06 +00:00
fleek did this
This commit is contained in:
parent
4043486550
commit
3b35680b72
@ -65,7 +65,7 @@ const DownloadPage = () => {
|
|||||||
return <tr key={value.number}>
|
return <tr key={value.number}>
|
||||||
<td align="center"><Button className="download" href={value.artifact ? `${value.url}/artifact/${value.artifact}` : value.url}>#{value.number}</Button></td>
|
<td align="center"><Button className="download" href={value.artifact ? `${value.url}/artifact/${value.artifact}` : value.url}>#{value.number}</Button></td>
|
||||||
<td className="commits"><ul>{value.changes?.map(value1 => {
|
<td className="commits"><ul>{value.changes?.map(value1 => {
|
||||||
return (<li key={value1.id}>[<a className="commit_id" href={`https://github.com/AtlasMediaGroup/Scissors/commit/${value1.id}`}>{value1.id}</a>] {value1.comment}</li>)
|
return (<li key={value1.id}>[<a className="commit_id" href={value1.id !== "x" ? `https://github.com/AtlasMediaGroup/Scissors/commit/${value1.id}` : `https://github.com/AtlasMediaGroup/Scissors/tree/${version}`}>{value1.id}</a>] {value1.comment}</li>)
|
||||||
})}</ul></td>
|
})}</ul></td>
|
||||||
<td className="date" align="center">{dayjs(value.timestamp!).format("MM/DD/YYYY [at] hh:mm A")}</td>
|
<td className="date" align="center">{dayjs(value.timestamp!).format("MM/DD/YYYY [at] hh:mm A")}</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -32,7 +32,6 @@ export function getJobs(): Promise<Job[]> {
|
|||||||
}).catch(() => reject)
|
}).catch(() => reject)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getBuilds(version: string): Promise<Build[]> {
|
export function getBuilds(version: string): Promise<Build[]> {
|
||||||
let builds: Build[] = []
|
let builds: Build[] = []
|
||||||
let request = axios.get(`${JENKINS_URL}/${ARTIFACT_NAME}/job/${version}/api/json?pretty=true`)
|
let request = axios.get(`${JENKINS_URL}/${ARTIFACT_NAME}/job/${version}/api/json?pretty=true`)
|
||||||
@ -46,22 +45,30 @@ export function getBuilds(version: string): Promise<Build[]> {
|
|||||||
let changeSet: any[] = value1.data.changeSets
|
let changeSet: any[] = value1.data.changeSets
|
||||||
if (changeSet.length > 0) {
|
if (changeSet.length > 0) {
|
||||||
let changes = changeSet[0].items as BuildChange[]
|
let changes = changeSet[0].items as BuildChange[]
|
||||||
|
if (changes.length > 0) {
|
||||||
for (let change of changes) {
|
for (let change of changes) {
|
||||||
change.id = change.id.substring(0, 7)
|
change.id = change.id.substring(0, 7)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
build.changes = changes
|
build.changes = changes
|
||||||
if (value1.data.artifacts) {
|
if (value1.data.artifacts) {
|
||||||
let artifacts: any[] = value1.data.artifacts
|
let artifacts: any[] = value1.data.artifacts
|
||||||
if (artifacts.length > 0) {
|
if (artifacts.length > 0) {
|
||||||
build.artifact = value1.data.artifacts[0].relativePath
|
build.artifact = artifacts[0].relativePath
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
let changes: BuildChange[] = []
|
||||||
|
changes.push({
|
||||||
|
id: "x",
|
||||||
|
comment: "No changes"
|
||||||
|
})
|
||||||
|
build.changes = changes
|
||||||
|
}
|
||||||
|
|
||||||
resolve(builds)
|
resolve(builds)
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}).catch(() => reject)
|
}).catch(() => reject)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user