mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-30 13:14:22 +01:00
Add Platform Gitea (#1884)
This commit is contained in:
1 parent
c5683ca6a3
commit
722ce8213a
4 files changed
+63
No files matched your search
@@ -13,6 +13,7 @@ const (
|
||||
GitHubPlatform
|
||||
GitLabPlatform
|
||||
AzureDevOpsPlatform
|
||||
GiteaPlatform
|
||||
// TODO: Add others.
|
||||
)
|
||||
|
||||
@@ -23,6 +24,7 @@ func (p Platform) String() string {
|
||||
"github",
|
||||
"gitlab",
|
||||
"azuredevops",
|
||||
"gitea",
|
||||
}[p]
|
||||
}
|
||||
|
||||
@@ -38,6 +40,8 @@ func PlatformFromString(s string) (Platform, error) {
|
||||
return GitLabPlatform, nil
|
||||
case "azuredevops":
|
||||
return AzureDevOpsPlatform, nil
|
||||
case "gitea":
|
||||
return GiteaPlatform, nil
|
||||
default:
|
||||
return UnknownPlatform, fmt.Errorf("invalid scm platform value: %s", s)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user