Skip to content

Commit

Permalink
use repository name as default service name for contribs
Browse files Browse the repository at this point in the history
  • Loading branch information
anmarchenko committed Jan 15, 2024
1 parent 125a53b commit 0f28e32
Show file tree
Hide file tree
Showing 4 changed files with 556 additions and 459 deletions.
5 changes: 4 additions & 1 deletion lib/datadog/ci/contrib/cucumber/configuration/settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

require_relative "../ext"
require_relative "../../settings"
require_relative "../../../utils/git"

module Datadog
module CI
Expand All @@ -21,7 +22,9 @@ class Settings < Datadog::CI::Contrib::Settings

option :service_name do |o|
o.type :string
o.default { Datadog.configuration.service_without_fallback || Ext::DEFAULT_SERVICE_NAME }
o.default do
Datadog.configuration.service_without_fallback || Utils::Git.repository_name || Ext::DEFAULT_SERVICE_NAME
end
end

# @deprecated Will be removed in 1.0
Expand Down
5 changes: 4 additions & 1 deletion lib/datadog/ci/contrib/minitest/configuration/settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

require_relative "../ext"
require_relative "../../settings"
require_relative "../../../utils/git"

module Datadog
module CI
Expand All @@ -19,7 +20,9 @@ class Settings < Datadog::CI::Contrib::Settings

option :service_name do |o|
o.type :string
o.default { Datadog.configuration.service_without_fallback || Ext::DEFAULT_SERVICE_NAME }
o.default do
Datadog.configuration.service_without_fallback || Utils::Git.repository_name || Ext::DEFAULT_SERVICE_NAME
end
end

# @deprecated Will be removed in 1.0
Expand Down
5 changes: 4 additions & 1 deletion lib/datadog/ci/contrib/rspec/configuration/settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

require_relative "../ext"
require_relative "../../settings"
require_relative "../../../utils/git"

module Datadog
module CI
Expand All @@ -19,7 +20,9 @@ class Settings < Datadog::CI::Contrib::Settings

option :service_name do |o|
o.type :string
o.default { Datadog.configuration.service_without_fallback || Ext::DEFAULT_SERVICE_NAME }
o.default do
Datadog.configuration.service_without_fallback || Utils::Git.repository_name || Ext::DEFAULT_SERVICE_NAME
end
end

# @deprecated Will be removed in 1.0
Expand Down
Loading

0 comments on commit 0f28e32

Please sign in to comment.