Skip to content

Commit

Permalink
Fix issue with parsing JSON for new ENV logic in #884 and #885
Browse files Browse the repository at this point in the history
  • Loading branch information
mburumaxwell committed Nov 23, 2023
1 parent bf51662 commit 7cba9fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions updater/bin/update_script.rb
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ def allow_conditions_for(dep)
# Setup Ignore conditions #
# DEPENDABOT_IGNORE_CONDITIONS Example: [{"dependency-name":"ruby","versions":[">= 3.a", "< 4"]}]
##################################################################################################
ignores = JSON.parse(ENV.fetch("DEPENDABOT_IGNORE_CONDITIONS", nil)) || []
ignores = JSON.parse(ENV.fetch("DEPENDABOT_IGNORE_CONDITIONS", "[]"), symbolize_names: true)
$options[:ignore_conditions] = ignores.map do |ic|
Dependabot::Config::IgnoreCondition.new(
dependency_name: ic[:"dependency-name"],
Expand All @@ -255,7 +255,7 @@ def allow_conditions_for(dep)
# Setup Commit Message Options #
# DEPENDABOT_COMMIT_MESSAGE_OPTIONS Example: {"prefix":"(dependabot)"}
##################################################################################################
commit_message = JSON.parse(ENV.fetch("DEPENDABOT_COMMIT_MESSAGE_OPTIONS", nil)) || {}
commit_message = JSON.parse(ENV.fetch("DEPENDABOT_COMMIT_MESSAGE_OPTIONS", "{}"), symbolize_names: true)
$options[:commit_message_options] = Dependabot::Config::UpdateConfig::CommitMessageOptions.new(
prefix: commit_message[:prefix],
prefix_development: commit_message[:"prefix-development"] || commit_message[:prefix],
Expand Down

0 comments on commit 7cba9fc

Please sign in to comment.