diff --git a/common/lib/dependabot/clients/azure.rb b/common/lib/dependabot/clients/azure.rb index 14ea75b861..41b65bf6c1 100644 --- a/common/lib/dependabot/clients/azure.rb +++ b/common/lib/dependabot/clients/azure.rb @@ -176,7 +176,7 @@ def pull_requests(source_branch, target_branch) base_commit: String, commit_message: String, files: T::Array[Dependabot::DependencyFile], - author_details: T.nilable(T::Hash[String, String]) + author_details: T.nilable(T::Hash[Symbol, String]) ) .returns(T.untyped) end diff --git a/common/lib/dependabot/clients/codecommit.rb b/common/lib/dependabot/clients/codecommit.rb index cfdd571f0f..fcf4be970a 100644 --- a/common/lib/dependabot/clients/codecommit.rb +++ b/common/lib/dependabot/clients/codecommit.rb @@ -246,7 +246,7 @@ def create_branch(repo, branch_name, commit_id) sig do params( branch_name: String, - author_name: String, + author_name: T.nilable(String), base_commit: String, commit_message: String, files: T::Array[Dependabot::DependencyFile] diff --git a/common/lib/dependabot/metadata_finders/base.rb b/common/lib/dependabot/metadata_finders/base.rb index f2311ff954..1fd8d9cd54 100644 --- a/common/lib/dependabot/metadata_finders/base.rb +++ b/common/lib/dependabot/metadata_finders/base.rb @@ -1,4 +1,4 @@ -# typed: strict +# typed: strong # frozen_string_literal: true require "sorbet-runtime" diff --git a/common/lib/dependabot/pull_request_creator/bitbucket.rb b/common/lib/dependabot/pull_request_creator/bitbucket.rb index 8fff76997d..0f9786f86f 100644 --- a/common/lib/dependabot/pull_request_creator/bitbucket.rb +++ b/common/lib/dependabot/pull_request_creator/bitbucket.rb @@ -1,4 +1,4 @@ -# typed: strict +# typed: strong # frozen_string_literal: true require "sorbet-runtime" @@ -134,7 +134,7 @@ def create_commit base_commit, commit_message, files, - author + T.must(author) ) end diff --git a/common/lib/dependabot/pull_request_creator/codecommit.rb b/common/lib/dependabot/pull_request_creator/codecommit.rb index 19521749c4..56ea72058f 100644 --- a/common/lib/dependabot/pull_request_creator/codecommit.rb +++ b/common/lib/dependabot/pull_request_creator/codecommit.rb @@ -197,12 +197,11 @@ def pull_requests_for_branch sig { void } def create_commit - author = author_details&.slice(:name, :email, :date) - author = nil unless author&.any? + author = author_details&.slice(:name, :email, :date)&.values&.first codecommit_client_for_source.create_commit( branch_name, - author, + author.to_s, base_commit, commit_message, files diff --git a/common/spec/fixtures/projects/simple/Gemfile b/common/spec/fixtures/projects/simple/Gemfile index 0e6bb68184..84aa4e9a5f 100644 --- a/common/spec/fixtures/projects/simple/Gemfile +++ b/common/spec/fixtures/projects/simple/Gemfile @@ -1,3 +1,5 @@ +# frozen_string_literal: true + source "https://rubygems.org" gem "activesupport", ">= 6.0.0" diff --git a/elm/lib/dependabot/elm/file_fetcher.rb b/elm/lib/dependabot/elm/file_fetcher.rb index 1210316198..743212fdbd 100644 --- a/elm/lib/dependabot/elm/file_fetcher.rb +++ b/elm/lib/dependabot/elm/file_fetcher.rb @@ -1,4 +1,4 @@ -# typed: strict +# typed: strong # frozen_string_literal: true require "sorbet-runtime" diff --git a/npm_and_yarn/lib/dependabot/npm_and_yarn/sub_dependency_files_filterer.rb b/npm_and_yarn/lib/dependabot/npm_and_yarn/sub_dependency_files_filterer.rb index 954418207c..9a6334a004 100644 --- a/npm_and_yarn/lib/dependabot/npm_and_yarn/sub_dependency_files_filterer.rb +++ b/npm_and_yarn/lib/dependabot/npm_and_yarn/sub_dependency_files_filterer.rb @@ -1,4 +1,4 @@ -# typed: strict +# typed: strong # frozen_string_literal: true require "dependabot/utils"