Skip to content

Commit

Permalink
Rename #id_hash to #to_h
Browse files Browse the repository at this point in the history
Co-authored-by: Barry Gordon <896971+brrygrdn@users.noreply.github.com>
  • Loading branch information
Nishnha and brrygrdn authored Apr 25, 2023
1 parent 492c9c3 commit 99bef01
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions common/lib/dependabot/dependency_group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ def contains?(dependency)
rules.any? { |rule| WildcardMatcher.match?(rule, dependency.name) }
end

private

def id_hash
def to_h
{ "name" => serialized_group_name }
end

private

def serialized_group_name
name.downcase.gsub("-", "_").to_sym
Expand Down
2 changes: 1 addition & 1 deletion updater/lib/dependabot/api_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def dependency_group_hash(dependency_change)
# FIXME: We currently assumpt that _an attempt_ to send a DependencyGroup#id should
# result in the `grouped-update` flag being set, regardless of whether the
# DependencyGroup actually exists.
{ "dependency-group": dependency_change.dependency_group.id }.compact
{ "dependency-group": dependency_change.dependency_group.to_h }.compact
end

def create_pull_request_data(dependency_change, base_commit_sha)
Expand Down

0 comments on commit 99bef01

Please sign in to comment.