diff --git a/cmd/drone-server/config/config.go b/cmd/drone-server/config/config.go index 5a6562f1..bec51172 100644 --- a/cmd/drone-server/config/config.go +++ b/cmd/drone-server/config/config.go @@ -489,6 +489,12 @@ func (c *Config) IsGitea() bool { return c.Gitea.Server != "" } +// IsGitee returns true if the Gitee integration +// is activated. +func (c *Config) IsGitee() bool { + return c.Gitee.ClientID != "" +} + // IsBitbucket returns true if the Bitbucket Cloud // integration is activated. func (c *Config) IsBitbucket() bool { diff --git a/cmd/drone-server/inject_service.go b/cmd/drone-server/inject_service.go index f844c892..6a330223 100644 --- a/cmd/drone-server/inject_service.go +++ b/cmd/drone-server/inject_service.go @@ -212,6 +212,7 @@ func provideDatadog( EnableStash: config.IsStash(), EnableGogs: config.IsGogs(), EnableGitea: config.IsGitea(), + EnableGitee: config.IsGitee(), EnableAgents: !config.Agent.Disabled, }, ) diff --git a/metric/sink/config.go b/metric/sink/config.go index 9dcac6ca..49b4dea5 100644 --- a/metric/sink/config.go +++ b/metric/sink/config.go @@ -29,5 +29,6 @@ type Config struct { EnableStash bool EnableGogs bool EnableGitea bool + EnableGitee bool EnableAgents bool } diff --git a/metric/sink/tags.go b/metric/sink/tags.go index a3666d9c..06d89c70 100644 --- a/metric/sink/tags.go +++ b/metric/sink/tags.go @@ -42,6 +42,8 @@ func createTags(config Config) []string { tags = append(tags, "remote:gogs") case config.EnableGitea: tags = append(tags, "remote:gitea") + case config.EnableGitee: + tags = append(tags, "remote:gitee") default: tags = append(tags, "remote:undefined") }