diff --git a/plugins/github-release-manager/src/constants/constants.ts b/plugins/github-release-manager/src/constants/constants.ts index c60cc117cf..195a4b80af 100644 --- a/plugins/github-release-manager/src/constants/constants.ts +++ b/plugins/github-release-manager/src/constants/constants.ts @@ -29,3 +29,11 @@ export const DISABLE_CACHE = { 'If-None-Match': '', }, } as const; + +export const VERSIONING_STRATEGIES: { + semver: 'semver'; + calver: 'calver'; +} = { + semver: 'semver', + calver: 'calver', +} as const; diff --git a/plugins/github-release-manager/src/contexts/ProjectContext.ts b/plugins/github-release-manager/src/contexts/ProjectContext.ts index 75bf6db28d..d115c469fa 100644 --- a/plugins/github-release-manager/src/contexts/ProjectContext.ts +++ b/plugins/github-release-manager/src/contexts/ProjectContext.ts @@ -16,6 +16,7 @@ import { createContext, useContext } from 'react'; +import { VERSIONING_STRATEGIES } from '../constants/constants'; import { GitHubReleaseManagerError } from '../errors/GitHubReleaseManagerError'; export interface Project { @@ -39,7 +40,7 @@ export interface Project { * * Default: false */ - versioningStrategy: 'calver' | 'semver'; + versioningStrategy: keyof typeof VERSIONING_STRATEGIES; /** * Project props was provided via props *