From 78f750fe3b44ec09d894746d714dedf0eb26dae9 Mon Sep 17 00:00:00 2001 From: Brandon WELSCH Date: Tue, 30 Jul 2019 11:22:09 +0200 Subject: [PATCH 1/2] Added scm integrations types --- integrations.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/integrations.go b/integrations.go index 04c40518..7d3ffbea 100644 --- a/integrations.go +++ b/integrations.go @@ -6,6 +6,16 @@ import ( "github.com/Scalingo/go-scalingo/http" ) +type ScmType string + +// Type of SCM integrations +const ( + ScmGithubType ScmType = "github" // GitHub + ScmGithubEnterpriseType ScmType = "github-enterprise" // GitHub Enterprise (private instance) + ScmGitlabType ScmType = "gitlab" // GitLab.com + ScmGitlabSelfHostedType ScmType = "gitlab-self-hosted" // GitLab self-hosted (private instance) +) + type IntegrationsService interface { IntegrationsList() ([]Integration, error) IntegrationsCreate(scmType string, url string, accessToken string) (*Integration, error) From bd6089ac1a12e3d4d49f7b8e26af4cf90f59baa3 Mon Sep 17 00:00:00 2001 From: Brandon WELSCH Date: Tue, 30 Jul 2019 11:30:46 +0200 Subject: [PATCH 2/2] Rename ScmType to SCMType --- integrations.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/integrations.go b/integrations.go index 7d3ffbea..a7cd0bf8 100644 --- a/integrations.go +++ b/integrations.go @@ -6,14 +6,14 @@ import ( "github.com/Scalingo/go-scalingo/http" ) -type ScmType string +type SCMType string // Type of SCM integrations const ( - ScmGithubType ScmType = "github" // GitHub - ScmGithubEnterpriseType ScmType = "github-enterprise" // GitHub Enterprise (private instance) - ScmGitlabType ScmType = "gitlab" // GitLab.com - ScmGitlabSelfHostedType ScmType = "gitlab-self-hosted" // GitLab self-hosted (private instance) + SCMGithubType SCMType = "github" // GitHub + SCMGithubEnterpriseType SCMType = "github-enterprise" // GitHub Enterprise (private instance) + SCMGitlabType SCMType = "gitlab" // GitLab.com + SCMGitlabSelfHostedType SCMType = "gitlab-self-hosted" // GitLab self-hosted (private instance) ) type IntegrationsService interface {