Datadog add the tag of 'remote:gitee'
This commit is contained in:
parent
f51eb4ed22
commit
fab2899a2b
4 changed files with 10 additions and 0 deletions
|
@ -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 {
|
||||
|
|
|
@ -212,6 +212,7 @@ func provideDatadog(
|
|||
EnableStash: config.IsStash(),
|
||||
EnableGogs: config.IsGogs(),
|
||||
EnableGitea: config.IsGitea(),
|
||||
EnableGitee: config.IsGitee(),
|
||||
EnableAgents: !config.Agent.Disabled,
|
||||
},
|
||||
)
|
||||
|
|
|
@ -29,5 +29,6 @@ type Config struct {
|
|||
EnableStash bool
|
||||
EnableGogs bool
|
||||
EnableGitea bool
|
||||
EnableGitee bool
|
||||
EnableAgents bool
|
||||
}
|
||||
|
|
|
@ -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")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue