Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hh170424: Fixing the sorbet type errors. #9517

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,
thavaahariharangit marked this conversation as resolved.
Show resolved Hide resolved
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
Loading