Skip to content

Commit

Permalink
Merge pull request #9517 from dependabot/harry/hh170424
Browse files Browse the repository at this point in the history
hh170424: Fixing the sorbet type errors.
  • Loading branch information
thavaahariharangit committed Apr 17, 2024
2 parents cc82ae4 + b65a890 commit b6f86b6
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion common/lib/dependabot/clients/azure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion common/lib/dependabot/clients/codecommit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion common/lib/dependabot/metadata_finders/base.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: strict
# typed: strong
# frozen_string_literal: true

require "sorbet-runtime"
Expand Down
4 changes: 2 additions & 2 deletions common/lib/dependabot/pull_request_creator/bitbucket.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: strict
# typed: strong
# frozen_string_literal: true

require "sorbet-runtime"
Expand Down Expand Up @@ -134,7 +134,7 @@ def create_commit
base_commit,
commit_message,
files,
author
T.must(author)
)
end

Expand Down
5 changes: 2 additions & 3 deletions common/lib/dependabot/pull_request_creator/codecommit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions common/spec/fixtures/projects/simple/Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

source "https://rubygems.org"

gem "activesupport", ">= 6.0.0"
2 changes: 1 addition & 1 deletion elm/lib/dependabot/elm/file_fetcher.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: strict
# typed: strong
# frozen_string_literal: true

require "sorbet-runtime"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# typed: strict
# typed: strong
# frozen_string_literal: true

require "dependabot/utils"
Expand Down

0 comments on commit b6f86b6

Please sign in to comment.