Skip to content

Commit

Permalink
Avoid nil dependency_groups
Browse files Browse the repository at this point in the history
  • Loading branch information
brrygrdn committed Jul 14, 2023
1 parent 48302a5 commit 15beeeb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion updater/lib/dependabot/job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,12 @@ def initialize(attributes)
@update_subdependencies = attributes.fetch(:update_subdependencies)
@updating_a_pull_request = attributes.fetch(:updating_a_pull_request)
@vendor_dependencies = attributes.fetch(:vendor_dependencies, false)
@dependency_groups = attributes.fetch(:dependency_groups, [])
# TODO: Make this hash required
#
# We will need to do a pass updating the CLI and smoke tests before this is possible,
# so let's consider it optional for now. If we get a nil value, let's force it to be
# an array.
@dependency_groups = attributes.fetch(:dependency_groups, []) || []
@dependency_group_to_refresh = attributes.fetch(:dependency_group_to_refresh, nil)
@repo_private = attributes.fetch(:repo_private, nil)

Expand Down

0 comments on commit 15beeeb

Please sign in to comment.