Skip to content

Commit 2e3944d

Browse files
committed
Schedule page render branches properly
1 parent 81932bc commit 2e3944d

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

apps/webapp/app/presenters/v3/ScheduleListPresenter.server.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export type ScheduleListItem = {
3636
id: string;
3737
type: RuntimeEnvironmentType;
3838
userName?: string;
39+
branchName?: string;
3940
}[];
4041
};
4142
export type ScheduleList = Awaited<ReturnType<ScheduleListPresenter["call"]>>;
@@ -68,6 +69,7 @@ export class ScheduleListPresenter extends BasePresenter {
6869
id: true,
6970
type: true,
7071
slug: true,
72+
branchName: true,
7173
orgMember: {
7274
select: {
7375
user: {
@@ -267,7 +269,10 @@ export class ScheduleListPresenter extends BasePresenter {
267269
);
268270
}
269271

270-
return displayableEnvironment(environment, userId);
272+
return {
273+
...displayableEnvironment(environment, userId),
274+
branchName: environment.branchName ?? undefined,
275+
};
271276
}),
272277
};
273278
});

apps/webapp/app/presenters/v3/ViewSchedulePresenter.server.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export class ViewSchedulePresenter {
5353
},
5454
},
5555
},
56+
branchName: true,
5657
},
5758
},
5859
},
@@ -91,7 +92,10 @@ export class ViewSchedulePresenter {
9192
runs,
9293
environments: schedule.instances.map((instance) => {
9394
const environment = instance.environment;
94-
return displayableEnvironment(environment, userId);
95+
return {
96+
...displayableEnvironment(environment, userId),
97+
branchName: environment.branchName ?? undefined,
98+
};
9599
}),
96100
},
97101
};

0 commit comments

Comments
 (0)