feat: [CDE-739]: added type github enterprise scm provider for cde (#3708)

* feat: [CDE-739]: added github enterprise scm provider for cde
* feat: [CDE-739]: added github enterprise scm provider for cde
This commit is contained in:
Ansuman Satapathy 2025-04-22 05:51:09 +00:00 committed by Harness
parent 2ef1ed0f4c
commit febd3e3fc9
2 changed files with 11 additions and 17 deletions

View File

@ -55,14 +55,6 @@ type (
Password types.MaskSecret
}
OAuth2ClientRefCredentials struct {
ClientID string
ClientSecretRef string
GrantType string
RedirectURI string
Code string
}
OAuth2TokenRefCredentials struct {
UserPasswordCredentials
RefreshTokenRef string

View File

@ -27,19 +27,21 @@ var codeRepoTypes = []GitspaceCodeRepoType{
CodeRepoTypeGitness,
CodeRepoTypeGitlabOnPrem,
CodeRepoTypeBitbucketServer,
CodeRepoTypeGithubEnterprise,
}
const (
CodeRepoTypeGithub GitspaceCodeRepoType = "github"
CodeRepoTypeGitlab GitspaceCodeRepoType = "gitlab"
CodeRepoTypeGitness GitspaceCodeRepoType = "gitness"
CodeRepoTypeHarnessCode GitspaceCodeRepoType = "harness_code"
CodeRepoTypeBitbucket GitspaceCodeRepoType = "bitbucket"
CodeRepoTypeUnknown GitspaceCodeRepoType = "unknown"
CodeRepoTypeGitlabOnPrem GitspaceCodeRepoType = "gitlab_on_prem"
CodeRepoTypeBitbucketServer GitspaceCodeRepoType = "bitbucket_server"
CodeRepoTypeGithub GitspaceCodeRepoType = "github"
CodeRepoTypeGitlab GitspaceCodeRepoType = "gitlab"
CodeRepoTypeGitness GitspaceCodeRepoType = "gitness"
CodeRepoTypeHarnessCode GitspaceCodeRepoType = "harness_code"
CodeRepoTypeBitbucket GitspaceCodeRepoType = "bitbucket"
CodeRepoTypeUnknown GitspaceCodeRepoType = "unknown"
CodeRepoTypeGitlabOnPrem GitspaceCodeRepoType = "gitlab_on_prem"
CodeRepoTypeBitbucketServer GitspaceCodeRepoType = "bitbucket_server"
CodeRepoTypeGithubEnterprise GitspaceCodeRepoType = "github_enterprise"
)
func (p GitspaceCodeRepoType) IsOnPrem() bool {
return p == CodeRepoTypeGitlabOnPrem || p == CodeRepoTypeBitbucketServer
return p == CodeRepoTypeGitlabOnPrem || p == CodeRepoTypeBitbucketServer || p == CodeRepoTypeGithubEnterprise
}