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 4685361 commit 357ca28
Show file tree
Hide file tree
Showing 4 changed files with 520 additions and 492 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 357ca28

Please sign in to comment.