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:
Joost Voskuil authored and GitHub committed 2025-03-31 08:38:08 -05:00
1 parent 3e8cd2d1ab
commit af7d5bcb83
4 files changed
+44

No files matched your search

+4
View File
@@ -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)
}