Skip to content

Commit

Permalink
Fix default config with production release to be set with integrable
Browse files Browse the repository at this point in the history
  • Loading branch information
nid90 committed Oct 15, 2024
1 parent 0f42011 commit 8413fa9
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions app/models/release_platform.rb
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,14 @@ def set_default_config
}
}

base_config_map[:production_release] = DEFAULT_PROD_RELEASE_CONFIG[platform.to_sym] if production_ready?
if production_ready?
base_config_map[:production_release] = DEFAULT_PROD_RELEASE_CONFIG[platform.to_sym]
base_config_map[:production_release][:submissions].each do |submission|
submission[:integrable_id] = app.id
submission[:integrable_type] = "App"
end
end


Check failure on line 191 in app/models/release_platform.rb

View workflow job for this annotation

GitHub Actions / lint

Layout/EmptyLines: Extra blank line detected.
if base_config_map[:production_release].nil?
providable = app.integrations.build_channel.first.providable
Expand All @@ -200,6 +207,8 @@ def set_default_config
base_config_map[:beta_release][:submissions] = submissions
end

self.platform_config = Config::ReleasePlatform.from_json(base_config_map)
config_obj = Config::ReleasePlatform.from_json(base_config_map)
Rails.logger.debug { "Errors in default config for #{name}: #{config_obj.errors.full_messages}" } unless config_obj.valid?
self.platform_config = config_obj
end
end

0 comments on commit 8413fa9

Please sign in to comment.