Skip to content

Commit d2e305c

Browse files
Merge pull request #158 from devtron-labs/feat/aws-code-commit
feat: aws-code-commit
2 parents 13753b5 + 7670c7e commit d2e305c

File tree

6 files changed

+38
-4
lines changed

6 files changed

+38
-4
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devtron-labs/devtron-fe-common-lib",
3-
"version": "0.0.97",
3+
"version": "0.0.98",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",

src/Shared/Helpers.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,14 @@ export const useIntersection = (
207207
}
208208
export const isNullOrUndefined = (value: unknown): boolean => value === null || value === undefined
209209

210+
export const handleDisableSubmitOnEnter = (event: React.KeyboardEvent<HTMLFormElement>) => {
211+
const isTextArea = event.target instanceof HTMLTextAreaElement
212+
213+
if (event.key === 'Enter' && !isTextArea) {
214+
event.preventDefault()
215+
}
216+
}
217+
210218
export const getKeyToBooleanMapFromArray = <T extends string | number>(arr: T[] = []) =>
211219
arr.reduce<Record<T, boolean>>(
212220
(acc, key) => {

src/Shared/constants.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export const ModuleNameMap = {
5353
// TODO: Convert to object later if more formats arise
5454
export const DATE_TIME_FORMAT_STRING = 'ddd DD MMM YYYY HH:mm:ss'
5555
export const API_TOKEN_PREFIX = 'API-TOKEN:'
56+
export const DEFAULT_SECRET_PLACEHOLDER = '••••••••'
5657

5758
export enum PatchOperationType {
5859
replace = 'replace',

src/Shared/types.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,32 @@ export enum AggregationKeys {
488488

489489
export type AggregationKeysType = keyof typeof AggregationKeys
490490

491+
export enum GitOpsAuthModeType {
492+
SSH = 'SSH',
493+
PASSWORD = 'PASSWORD',
494+
SSH_AND_PASSWORD = 'PAT_AND_SSH',
495+
}
496+
497+
export interface BaseGitOpsType {
498+
authMode: GitOpsAuthModeType
499+
sshKey: string
500+
sshHost: string
501+
username: string
502+
token: string
503+
}
504+
505+
export type GitOpsFieldKeyType =
506+
| 'host'
507+
| 'username'
508+
| 'token'
509+
| 'gitHubOrgId'
510+
| 'azureProjectName'
511+
| 'gitLabGroupId'
512+
| 'bitBucketWorkspaceId'
513+
| 'bitBucketProjectKey'
514+
| 'sshHost'
515+
| 'sshKey'
516+
491517
export interface AppInfoListType {
492518
application: string
493519
appStatus: string

src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ export interface customEnv {
6969
ENABLE_RESOURCE_SCAN?: boolean
7070
FEATURE_USER_DEFINED_GITOPS_REPO_ENABLE: boolean
7171
ENABLE_RESOURCE_SCAN_V2?: boolean
72-
ENABLE_GITOPS_BITBUCKET_SOURCE: boolean
7372
HIDE_RESOURCE_WATCHER?: boolean
7473
ORGANIZATION_NAME: string
7574
}

0 commit comments

Comments
 (0)