Skip to content

Commit 5154879

Browse files
committed
feat: add artifact release mapping info in cd material type
1 parent 3024d75 commit 5154879

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

src/Common/Common.service.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ const cdMaterialListModal = (artifacts: any[], offset: number, artifactId?: numb
144144
promotionApprovalMetadata: material.promotionApprovalMetadata,
145145
deployedOnEnvironments: material.deployedOnEnvironments ?? [],
146146
deploymentWindowArtifactMetadata: material.deploymentWindowArtifactMetadata ?? null,
147+
configuredInReleases: material.configuredInReleases ?? [],
147148
}
148149
})
149150
return materials
@@ -174,6 +175,7 @@ const processCDMaterialsMetaInfo = (cdMaterialsResult): CDMaterialsMetaInfo => {
174175
resourceFilters: [],
175176
totalCount: 0,
176177
requestedUserId: 0,
178+
appWorkflowId: 0,
177179
}
178180
}
179181

@@ -184,6 +186,7 @@ const processCDMaterialsMetaInfo = (cdMaterialsResult): CDMaterialsMetaInfo => {
184186
resourceFilters: cdMaterialsResult.resourceFilters ?? [],
185187
totalCount: cdMaterialsResult.totalCount ?? 0,
186188
requestedUserId: cdMaterialsResult.requestedUserId,
189+
appWorkflowId: cdMaterialsResult.appWorkflowId,
187190
}
188191
}
189192

src/Common/Types.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,16 @@ export interface DeploymentWindowArtifactMetadata {
353353
type: DEPLOYMENT_WINDOW_TYPE
354354
}
355355

356+
export interface ArtifactReleaseMappingType {
357+
id : number,
358+
identifier: string,
359+
// TODO: Ask BE to rename this to `releaseVersion`
360+
releaseVersion: string,
361+
name: string
362+
kind: string
363+
version: string
364+
}
365+
356366
export interface CDMaterialType {
357367
index: number
358368
id: string
@@ -397,6 +407,10 @@ export interface CDMaterialType {
397407
promotionApprovalMetadata?: PromotionApprovalMetadataType
398408
deployedOnEnvironments?: string[]
399409
deploymentWindowArtifactMetadata?: DeploymentWindowArtifactMetadata
410+
/**
411+
* Will only be present in case of release
412+
*/
413+
configuredInReleases: ArtifactReleaseMappingType[]
400414
}
401415

402416
export enum CDMaterialServiceEnum {
@@ -577,6 +591,10 @@ export interface CDMaterialsMetaInfo {
577591
* This is the ID of user that has request the material
578592
*/
579593
requestedUserId: number
594+
/**
595+
* Would currently only be received in case of release, otherwise it would be 0
596+
*/
597+
appWorkflowId: number
580598
}
581599

582600
export interface ImagePromotionMaterialInfo {

0 commit comments

Comments
 (0)