Skip to content

Commit 151be48

Browse files
committed
chore: remove old runtime parameters dead code
1 parent 87a03b1 commit 151be48

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

src/Common/Common.service.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
import { MutableRefObject } from 'react'
1818
import moment from 'moment'
19-
import { RuntimeParamsAPIResponseType, RuntimeParamsListItemType } from '@Shared/types'
19+
import { RuntimeParamsAPIResponseType } from '@Shared/types'
2020
import { getIsManualApprovalSpecific, sanitizeUserApprovalConfig, stringComparatorBySortOrder } from '@Shared/Helpers'
2121
import { get, getIsRequestAborted, post } from './Api'
2222
import { API_STATUS_CODES, GitProviderType, ROUTES } from './Constants'
@@ -324,10 +324,7 @@ const processCDMaterialsApprovalInfo = (enableApproval: boolean, cdMaterialsResu
324324
}
325325
}
326326

327-
export const parseRuntimeParams = (response: RuntimeParamsAPIResponseType): RuntimeParamsListItemType[] =>
328-
Object.entries(response?.envVariables || {})
329-
.map(([key, value], index) => ({ key, value, id: index }))
330-
.sort((a, b) => stringComparatorBySortOrder(a.key, b.key))
327+
331328

332329
const processCDMaterialsMetaInfo = (cdMaterialsResult): CDMaterialsMetaInfo => {
333330
if (!cdMaterialsResult) {

src/Shared/types.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import {
2929
RefVariableType,
3030
PluginType,
3131
} from '../Common'
32-
import { KeyValueListType } from './Components'
3332
import { EnvironmentTypeEnum, PatchOperationType } from './constants'
3433

3534
export enum EnvType {
@@ -358,10 +357,6 @@ export interface RuntimeParamsAPIResponseType {
358357
}
359358

360359
export interface RuntimeParamsTriggerPayloadType {
361-
runtimeParams: Pick<RuntimeParamsAPIResponseType, 'envVariables'>
362-
}
363-
364-
export interface RuntimeParamsV2TriggerPayloadType {
365360
runtimeParams: {
366361
runtimePluginVariables: Pick<
367362
RuntimePluginVariables,
@@ -726,10 +721,6 @@ export interface ConfigKeysWithLockType {
726721

727722
export type DataAttributes = Record<`data-${string}`, unknown>
728723

729-
export interface RuntimeParamsListItemType extends KeyValueListType {
730-
id: number
731-
}
732-
733724
export enum RuntimeParamsHeadingType {
734725
KEY = 'key',
735726
VALUE = 'value',

0 commit comments

Comments
 (0)