Skip to content

Commit

Permalink
fix linting and better naming and typing
Browse files Browse the repository at this point in the history
  • Loading branch information
anmarchenko committed Sep 1, 2023
1 parent ba85509 commit c6d0401
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/datadog/ci/ext/environment/extractor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Extractor
require_relative "providers/buddy"
require_relative "providers/buildkite"

EXTRACTORS = [
PROVIDERS = [
["APPVEYOR", Providers::Appveyor],
["TF_BUILD", Providers::Azure],
["BITBUCKET_COMMIT", Providers::Bitbucket],
Expand All @@ -27,7 +27,7 @@ class Extractor
]

def self.for_environment(env)
_, extractor_klass = EXTRACTORS.find { |provider_env_var, _| env.key?(provider_env_var) }
_, extractor_klass = PROVIDERS.find { |provider_env_var, _| env.key?(provider_env_var) }
extractor_klass = Providers::Default if extractor_klass.nil?

extractor_klass.new(env)
Expand Down
1 change: 0 additions & 1 deletion lib/datadog/ci/ext/environment/providers/buildkite.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ def ci_env_vars
end

# buildkite-specific methods

end
end
end
Expand Down
2 changes: 1 addition & 1 deletion sig/datadog/ci/ext/environment/extractor.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module Datadog
module Environment
class Extractor

EXTRACTORS: ::Array[::Array[String | untyped]]
PROVIDERS: ::Array[[String, singleton(Extractor)]]
@branch: String?
@tag: String?

Expand Down

0 comments on commit c6d0401

Please sign in to comment.