fix(logs): include missing deployment UUIDs in anatomy output so frontend can reliably fetch build logs
This commit is contained in:
@@ -70,6 +70,7 @@ interface ProductImage {
|
||||
}
|
||||
|
||||
interface BuildSummary {
|
||||
uuid: string;
|
||||
status: string;
|
||||
createdAt?: string;
|
||||
finishedAt?: string;
|
||||
@@ -466,6 +467,7 @@ async function lastBuildFor(uuid: string): Promise<BuildSummary | undefined> {
|
||||
if (!deployments.length) return undefined;
|
||||
const finished = deployments.find((d) => d.finished_at) ?? deployments[0];
|
||||
return {
|
||||
uuid: finished.deployment_uuid,
|
||||
status: finished.status,
|
||||
finishedAt: finished.finished_at,
|
||||
commit: finished.commit,
|
||||
@@ -499,6 +501,7 @@ async function deploymentActivityFor(uuid: string): Promise<{
|
||||
return {
|
||||
lastBuild: finishedDep
|
||||
? {
|
||||
uuid: finishedDep.deployment_uuid,
|
||||
status: finishedDep.status,
|
||||
createdAt: finishedDep.created_at,
|
||||
finishedAt: finishedDep.finished_at,
|
||||
@@ -507,6 +510,7 @@ async function deploymentActivityFor(uuid: string): Promise<{
|
||||
: undefined,
|
||||
inFlight: inFlightDep
|
||||
? {
|
||||
uuid: inFlightDep.deployment_uuid,
|
||||
status: inFlightDep.status,
|
||||
createdAt: inFlightDep.created_at,
|
||||
finishedAt: inFlightDep.finished_at,
|
||||
|
||||
@@ -49,12 +49,14 @@ export interface Anatomy {
|
||||
branch?: string;
|
||||
buildPack?: string;
|
||||
lastBuild?: {
|
||||
uuid: string;
|
||||
status: string;
|
||||
createdAt?: string;
|
||||
finishedAt?: string;
|
||||
commit?: string;
|
||||
};
|
||||
inFlightBuild?: {
|
||||
uuid: string;
|
||||
status: string;
|
||||
createdAt?: string;
|
||||
finishedAt?: string;
|
||||
|
||||
Reference in New Issue
Block a user