Skip to content

Conversation

@m-wayne
Copy link

@m-wayne m-wayne commented Dec 23, 2025

Description

  • Uses langs specified in env files for beta uploads
  • Skips lang detection for release uploads

Testing Steps

Beta uploads
Release uploads

image image

Note

Introduces explicit control over which locales are used/updated during uploads.

  • Deliver: New skip_language_detection option in options.rb. When set (and not edit_live), upload_metadata.rb uses existing App Store Connect localizations via version.get_app_store_version_localizations and app_info.get_app_info_localizations instead of verify_available_*_languages! (no new locales are created/enabled).
  • Pilot: New languages option (and LANGUAGES env) in options.rb. build_manager.rb adds allowed_locales and filters update_localized_app_review/update_localized_build_review to only update locales in this list.

Written by Cursor Bugbot for commit d230614. This will update automatically on new commits. Configure here.

@m-wayne m-wayne force-pushed the mwayne/skip-lang-detection branch from b0c6044 to f342cea Compare December 23, 2025 22:12
@m-wayne m-wayne force-pushed the mwayne/skip-lang-detection branch from f342cea to dea184a Compare January 5, 2026 19:31
@m-wayne m-wayne force-pushed the mwayne/skip-lang-detection branch from dea184a to d230614 Compare January 5, 2026 19:36
@m-wayne
Copy link
Author

m-wayne commented Jan 5, 2026

bugbot run

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no bugs!

@m-wayne m-wayne marked this pull request as ready for review January 5, 2026 21:24
@m-wayne m-wayne requested a review from a team January 5, 2026 21:27

langs = langs.split(",") unless langs.kind_of?(Array)
langs.map { |l| l.to_s.strip }.reject(&:empty?)
end
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Empty LANGUAGES value silently skips all metadata updates

The allowed_locales method returns an empty array [] when LANGUAGES is set to an empty string or languages is set to an empty array. Since empty strings are truthy in Ruby, the return nil unless langs check passes, and after processing, an empty array is returned. In the calling code, if allowed is truthy for an empty array, causing info_by_lang.select! to filter out all locales and the loop to skip all iterations. This silently prevents any localized metadata from being updated, which could be surprising if a user accidentally sets LANGUAGES="" thinking it means "no filtering."

Fix in Cursor Fix in Web

unless options[:edit_live]
if options[:skip_language_detection]
# Do not create/enable additional locales; use what already exists on ASC
app_store_version_localizations = version.get_app_store_version_localizations
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing nil check for version when skip_language_detection enabled

When skip_language_detection is true, the code calls version.get_app_store_version_localizations without checking if version is nil. The fetch_edit_app_store_version method can return nil after exhausting retries. The bypassed verify_available_version_languages! method has a nil check that calls UI.user_error! with a descriptive message, but this new code path skips that protection. This could cause a NoMethodError crash instead of a proper error message. Notably, line 133 uses safe navigation app_info&.get_app_info_localizations but line 126 does not use similar nil protection for version.

Fix in Cursor Fix in Web

@m-wayne m-wayne merged commit 7ea4ed0 into master Jan 5, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants