Skip to content

Commit

Permalink
feat: Set edp as default versioning type (#437)
Browse files Browse the repository at this point in the history
  • Loading branch information
callmevladik authored and MykolaMarusenko committed Oct 18, 2024
1 parent b70af78 commit 659e3c5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { useGitServerListQuery } from '../../../../k8s/groups/EDP/GitServer/hook
import { TemplateKubeObjectInterface } from '../../../../k8s/groups/EDP/Template/types';
import { CODEBASE_FROM_TEMPLATE_FORM_NAMES } from '../names';

const defaultEDPVersioningValue = '0.1.0-SNAPSHOT';
const defaultBranchName = 'main';
const defaultEDPVersioningValue = '0.1.0-SNAPSHOT';
const [defaultEDPVersioningVersion, defaultEDPVersioningVersionPostfix] =
defaultEDPVersioningValue.split('-');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ import { CODEBASE_VERSIONING_TYPES } from '../../../../../../constants/codebaseV
import { useGitServerListQuery } from '../../../../../../k8s/groups/EDP/GitServer/hooks/useGitServerListQuery';
import { CODEBASE_FORM_NAMES } from '../../../names';

const defaultEDPVersioningValue = '0.1.0-SNAPSHOT';
const [defaultEDPVersioningVersion, defaultEDPVersioningVersionPostfix] =
defaultEDPVersioningValue.split('-');

export const useDefaultValues = () => {
const { data: gitServers } = useGitServerListQuery({});

Expand All @@ -13,7 +17,10 @@ export const useDefaultValues = () => {
() => ({
[CODEBASE_FORM_NAMES.defaultBranch.name]: 'main',
[CODEBASE_FORM_NAMES.emptyProject.name]: false,
[CODEBASE_FORM_NAMES.versioningType.name]: CODEBASE_VERSIONING_TYPES.DEFAULT,
[CODEBASE_FORM_NAMES.versioningType.name]: CODEBASE_VERSIONING_TYPES.EDP,
[CODEBASE_FORM_NAMES.versioningStartFrom.name]: defaultEDPVersioningValue,
[CODEBASE_FORM_NAMES.versioningStartFromVersion.name]: defaultEDPVersioningVersion,
[CODEBASE_FORM_NAMES.versioningStartFromSnapshot.name]: defaultEDPVersioningVersionPostfix,
[CODEBASE_FORM_NAMES.ciTool.name]: CI_TOOLS.TEKTON,
[CODEBASE_FORM_NAMES.gitServer.name]: firstValidGitServer?.metadata.name || '',
}),
Expand Down

0 comments on commit 659e3c5

Please sign in to comment.