mirror of
https://github.com/harness/drone.git
synced 2025-05-19 02:20:03 +08:00
feat: [CDE-205]: revert the changes in pr for ticket CDE-205 (#2334)
* feat: [CDE-205]: revert the changes in pr for ticket CDE-205
This commit is contained in:
parent
6232a8f5b8
commit
910c4819c7
@ -18,7 +18,7 @@ import css from './GitnessRepoImportForm.module.scss'
|
|||||||
|
|
||||||
const RepositoryText = ({ repoList, value }: { repoList: TypesRepository[] | null; value?: string }) => {
|
const RepositoryText = ({ repoList, value }: { repoList: TypesRepository[] | null; value?: string }) => {
|
||||||
const { getString } = useStrings()
|
const { getString } = useStrings()
|
||||||
const repoMetadata = repoList?.find(repo => repo.path === value)
|
const repoMetadata = repoList?.find(repo => repo.git_url === value)
|
||||||
const repoName = repoMetadata?.path
|
const repoName = repoMetadata?.path
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -114,7 +114,7 @@ export const GitnessRepoImportForm = () => {
|
|||||||
const formik = useFormikContext<any>()
|
const formik = useFormikContext<any>()
|
||||||
|
|
||||||
const { values } = formik
|
const { values } = formik
|
||||||
const repoMetadata = repoListOptions.find(repo => repo.path === values.code_repo_url)
|
const repoMetadata = repoListOptions.find(repo => repo.git_url === values.code_repo_url)
|
||||||
if (repoRef !== repoMetadata?.path) {
|
if (repoRef !== repoMetadata?.path) {
|
||||||
setReporef(repoMetadata?.path as string)
|
setReporef(repoMetadata?.path as string)
|
||||||
}
|
}
|
||||||
@ -157,7 +157,7 @@ export const GitnessRepoImportForm = () => {
|
|||||||
<Text>{repo.path}</Text>
|
<Text>{repo.path}</Text>
|
||||||
</Layout.Horizontal>
|
</Layout.Horizontal>
|
||||||
}
|
}
|
||||||
active={repo.path === values.code_repo_url}
|
active={repo.git_url === values.code_repo_url}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
const repoParams = repo?.path?.split('/') || []
|
const repoParams = repo?.path?.split('/') || []
|
||||||
formik.setValues((prvValues: any) => {
|
formik.setValues((prvValues: any) => {
|
||||||
@ -166,11 +166,10 @@ export const GitnessRepoImportForm = () => {
|
|||||||
code_repo_url: repo.git_url,
|
code_repo_url: repo.git_url,
|
||||||
branch: repo.default_branch,
|
branch: repo.default_branch,
|
||||||
identifier: repoParams?.[repoParams.length - 1],
|
identifier: repoParams?.[repoParams.length - 1],
|
||||||
name: repo.path,
|
name: repo.path
|
||||||
code_repo_type: 'gitness'
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
formik.setFieldValue('code_repo_url', repo.path)
|
formik.setFieldValue('code_repo_url', repo.git_url)
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
))
|
))
|
||||||
|
@ -56,8 +56,7 @@ export const ThirdPartyRepoImportForm = () => {
|
|||||||
code_repo_url: response.url,
|
code_repo_url: response.url,
|
||||||
branch: response.branch,
|
branch: response.branch,
|
||||||
identifier: getRepoIdFromURL(response.url),
|
identifier: getRepoIdFromURL(response.url),
|
||||||
name: getRepoNameFromURL(response.url),
|
name: getRepoNameFromURL(response.url)
|
||||||
code_repo_type: 'unknown'
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
setRepoCheckState(RepoCheckStatus.Valid)
|
setRepoCheckState(RepoCheckStatus.Valid)
|
||||||
|
@ -22,7 +22,7 @@ export type EnumFileDiffStatus = string
|
|||||||
|
|
||||||
export type EnumGitspaceAccessType = 'jwt_token' | 'user_credentials' | 'ssh_key'
|
export type EnumGitspaceAccessType = 'jwt_token' | 'user_credentials' | 'ssh_key'
|
||||||
|
|
||||||
export type EnumGitspaceCodeRepoType = 'github' | 'gitlab' | 'harness_code' | 'bitbucket' | 'unknown' | 'gitness'
|
export type EnumGitspaceCodeRepoType = 'github' | 'gitlab' | 'harness_code' | 'bitbucket' | 'unknown'
|
||||||
|
|
||||||
export type EnumGitspaceEntityType = 'gitspace_config' | 'gitspace_instance'
|
export type EnumGitspaceEntityType = 'gitspace_config' | 'gitspace_instance'
|
||||||
|
|
||||||
@ -319,7 +319,6 @@ export interface OpenapiCreateConnectorRequest {
|
|||||||
export interface OpenapiCreateGitspaceRequest {
|
export interface OpenapiCreateGitspaceRequest {
|
||||||
branch?: string
|
branch?: string
|
||||||
code_repo_url?: string
|
code_repo_url?: string
|
||||||
code_repo_type?: EnumGitspaceCodeRepoType
|
|
||||||
devcontainer_path?: string | null
|
devcontainer_path?: string | null
|
||||||
ide?: EnumIDEType
|
ide?: EnumIDEType
|
||||||
identifier?: string
|
identifier?: string
|
||||||
|
Loading…
Reference in New Issue
Block a user