Skip to content

Commit f471e90

Browse files
authored
Merge pull request #446 from devtron-labs/fix/approval-policy
fix: code review changes
2 parents 35721ab + 713670c commit f471e90

File tree

5 files changed

+10
-8
lines changed

5 files changed

+10
-8
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devtron-labs/devtron-fe-common-lib",
3-
"version": "1.2.3-beta-3",
3+
"version": "1.2.4-beta-4",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",
@@ -10,7 +10,7 @@
1010
],
1111
"repository": {
1212
"type": "git",
13-
"url": "https://github.com/devtron-labs/devtron-fe-common-lib.git"
13+
"url": "git+https://github.com/devtron-labs/devtron-fe-common-lib.git"
1414
},
1515
"author": "Devtron",
1616
"license": "ISC",

src/Common/Common.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ const sanitizeDeploymentApprovalInfo = (
197197
approverList: sanitizeUserApprovalList(deploymentApprovalInfo?.eligibleApprovers?.anyUsers?.approverList),
198198
},
199199
specificUsers: {
200-
approverList: sanitizeUserApprovalList(deploymentApprovalInfo?.eligibleApprovers?.anyUsers?.approverList),
200+
approverList: sanitizeUserApprovalList(deploymentApprovalInfo?.eligibleApprovers?.specificUsers?.approverList),
201201
},
202202
userGroups: (deploymentApprovalInfo?.eligibleApprovers?.userGroups ?? []).map(
203203
({ groupName, groupIdentifier, approverList }) => ({

src/Common/Helper.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,7 @@ export const processDeployedTime = (lastDeployed, isArgoInstalled) => {
490490
*/
491491
export const getUrlWithSearchParams = <T extends string | number = string | number>(
492492
url: string,
493+
// FIXME: Need to fix this as the generic typing is incorrect
493494
params = {} as Partial<Record<T, any>>,
494495
) => {
495496
const searchParams = new URLSearchParams()

src/Common/Types.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -374,9 +374,10 @@ export interface UserApprovalInfo {
374374
}
375375

376376
export enum ApprovalConfigDataKindType {
377-
configMap = 'CM',
378-
configSecret = 'CS',
379-
deploymentTemplate = 'DEPLOYMENT_TEMPLATE',
377+
configMap = 'configuration/config-map',
378+
configSecret = 'configuration/config-secret',
379+
deploymentTemplate = 'configuration/deployment-template',
380+
deploymentTrigger = 'approval/deployment',
380381
}
381382

382383
export interface ApprovalConfigDataType extends Pick<UserApprovalInfo, 'currentCount' | 'requiredCount'> {

0 commit comments

Comments
 (0)