mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-30 05:04:22 +01:00
add support for Azure DevOps platform in SCM detection and link (#1807)
* feat: add support for Azure DevOps platform in SCM detection and link generation * feat: add support for visualstudio.com in Azure DevOps platform detection * feat: consolidate Azure DevOps platform detection for dev.azure.com and visualstudio.com
This commit is contained in:
1 parent
3e8cd2d1ab
commit
af7d5bcb83
4 files changed
+44
No files matched your search
@@ -12,6 +12,7 @@ const (
|
||||
NoPlatform // Explicitly disable the feature
|
||||
GitHubPlatform
|
||||
GitLabPlatform
|
||||
AzureDevOpsPlatform
|
||||
// TODO: Add others.
|
||||
)
|
||||
|
||||
@@ -21,6 +22,7 @@ func (p Platform) String() string {
|
||||
"none",
|
||||
"github",
|
||||
"gitlab",
|
||||
"azuredevops",
|
||||
}[p]
|
||||
}
|
||||
|
||||
@@ -34,6 +36,8 @@ func PlatformFromString(s string) (Platform, error) {
|
||||
return GitHubPlatform, nil
|
||||
case "gitlab":
|
||||
return GitLabPlatform, nil
|
||||
case "azuredevops":
|
||||
return AzureDevOpsPlatform, nil
|
||||
default:
|
||||
return UnknownPlatform, fmt.Errorf("invalid scm platform value: %s", s)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user