[PR #435] [MERGED] Fix migrate import: omit locale on PATCH + choose PREPARE_FOR_SUBMISSION appInfo #526

Closed
opened 2026-02-26 22:31:22 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/rudrankriyam/App-Store-Connect-CLI/pull/435
Author: @cameronehrlich
Created: 2/7/2026
Status: Merged
Merged: 2/7/2026
Merged by: @rudrankriyam

Base: mainHead: codex/migrate-import-fixes


📝 Commits (2)

  • ec00f6f fix(migrate): omit locale on updates; prefer editable appInfo
  • bcea0b7 Merge main into codex/migrate-import-fixes

📊 Changes

4 files changed (+119 additions, -34 deletions)

View changed files

📝 internal/asc/client.go (+2 -4)
📝 internal/asc/client_http_test.go (+25 -13)
📝 internal/cli/migrate/migrate.go (+41 -17)
📝 internal/cli/migrate/migrate_test.go (+51 -0)

📄 Description

Problem

  1. asc migrate import includes locale in PATCH payloads for appStoreVersionLocalizations and appInfoLocalizations. App Store Connect rejects this with:
  • The attribute 'locale' can not be included in a 'UPDATE' request.
  1. Some apps have multiple appInfos (for example one in READY_FOR_SALE and one in PREPARE_FOR_SUBMISSION). The current import logic uses the first appInfo, which can select the READY_FOR_SALE record and fail updates like:
  • name can not be modified in the current state

Changes

  • Omit locale from PATCH update requests in:

    • Client.UpdateAppStoreVersionLocalization
    • Client.UpdateAppInfoLocalization
  • Update migrate import appInfo selection:

    • Prefer appInfo where state or appStoreState is PREPARE_FOR_SUBMISSION
    • Otherwise prefer any appStoreState that is not READY_FOR_SALE
    • Otherwise fall back to the first record

Verification

  • Added tests ensuring locale is omitted from PATCH payloads.
  • Added tests for appInfo selection.
  • go test ./... and make build pass.
  • Verified asc migrate import succeeds for a real app with two appInfos (one READY_FOR_SALE, one PREPARE_FOR_SUBMISSION).

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/rudrankriyam/App-Store-Connect-CLI/pull/435 **Author:** [@cameronehrlich](https://github.com/cameronehrlich) **Created:** 2/7/2026 **Status:** ✅ Merged **Merged:** 2/7/2026 **Merged by:** [@rudrankriyam](https://github.com/rudrankriyam) **Base:** `main` ← **Head:** `codex/migrate-import-fixes` --- ### 📝 Commits (2) - [`ec00f6f`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/ec00f6fcd31b94d128d9b3594f6336c9bcc6bef4) fix(migrate): omit locale on updates; prefer editable appInfo - [`bcea0b7`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/bcea0b77e89e90b51dde3b48f0c90d8656764461) Merge main into codex/migrate-import-fixes ### 📊 Changes **4 files changed** (+119 additions, -34 deletions) <details> <summary>View changed files</summary> 📝 `internal/asc/client.go` (+2 -4) 📝 `internal/asc/client_http_test.go` (+25 -13) 📝 `internal/cli/migrate/migrate.go` (+41 -17) 📝 `internal/cli/migrate/migrate_test.go` (+51 -0) </details> ### 📄 Description ## Problem 1) `asc migrate import` includes `locale` in PATCH payloads for `appStoreVersionLocalizations` and `appInfoLocalizations`. App Store Connect rejects this with: - `The attribute 'locale' can not be included in a 'UPDATE' request.` 2) Some apps have multiple `appInfos` (for example one in `READY_FOR_SALE` and one in `PREPARE_FOR_SUBMISSION`). The current import logic uses the first appInfo, which can select the `READY_FOR_SALE` record and fail updates like: - `name can not be modified in the current state` ## Changes - Omit `locale` from PATCH update requests in: - `Client.UpdateAppStoreVersionLocalization` - `Client.UpdateAppInfoLocalization` - Update `migrate import` appInfo selection: - Prefer appInfo where `state` or `appStoreState` is `PREPARE_FOR_SUBMISSION` - Otherwise prefer any `appStoreState` that is not `READY_FOR_SALE` - Otherwise fall back to the first record ## Verification - Added tests ensuring `locale` is omitted from PATCH payloads. - Added tests for appInfo selection. - `go test ./...` and `make build` pass. - Verified `asc migrate import` succeeds for a real app with two `appInfos` (one `READY_FOR_SALE`, one `PREPARE_FOR_SUBMISSION`). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 22:31:22 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/App-Store-Connect-CLI#526
No description provided.