[PR #641] [MERGED] Relationship client audit follow-ups #675

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

📋 Pull Request Information

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

Base: mainHead: fix/relationships-audit-followups


📝 Commits (5)

  • 0959530 docs: note Game Center spec discrepancy
  • 2ca0840 fix(asc): validate IDs for relationship add/remove
  • f79a9f8 refactor(asc): consolidate relationship linkages helpers
  • e03f0fe refactor(asc): standardize relationship HTTP + errors
  • b166592 fix(asc): correct challengesMinimumPlatformVersions linkage type

📊 Changes

23 files changed (+599 additions, -871 deletions)

View changed files

📝 docs/API_NOTES.md (+3 -0)
📝 internal/asc/client_app_encryption_relationships.go (+8 -7)
📝 internal/asc/client_app_info_relationships.go (+33 -76)
📝 internal/asc/client_apps_relationships.go (+9 -32)
📝 internal/asc/client_build_relationships.go (+23 -44)
📝 internal/asc/client_bundle_id_relationships.go (+14 -31)
📝 internal/asc/client_game_center_achievements_relationships.go (+3 -3)
📝 internal/asc/client_game_center_activities_relationships.go (+42 -6)
📝 internal/asc/client_game_center_app_versions_relationships.go (+21 -3)
📝 internal/asc/client_game_center_challenges_relationships.go (+2 -2)
📝 internal/asc/client_game_center_details_relationships.go (+11 -33)
📝 internal/asc/client_game_center_enabled_versions_relationships.go (+20 -2)
📝 internal/asc/client_game_center_groups_relationships.go (+9 -32)
📝 internal/asc/client_game_center_leaderboards_relationships.go (+40 -66)
📝 internal/asc/client_game_center_leaderboards_relationships_v2.go (+18 -63)
📝 internal/asc/client_game_center_localizations_relationships.go (+3 -3)
internal/asc/client_game_center_relationships_validation_test.go (+176 -0)
📝 internal/asc/client_http_issue_616_game_center_detail_group_relationships_test.go (+1 -1)
📝 internal/asc/client_linkages_generic.go (+1 -1)
📝 internal/asc/client_prerelease_relationships.go (+12 -33)

...and 3 more files

📄 Description

What

Implements the follow-ups from the relationship endpoints audit:

  • Verify + document live API behavior for gameCenterDetails.challengesMinimumPlatformVersions (replace-only; appStoreVersions linkages; requires live versions; rejects gameCenterAppVersions).
  • Align UpdateGameCenterDetailChallengesMinimumPlatformVersionsRelationship request type + tests to appStoreVersions.
  • Add input validation for Game Center relationship add/remove helpers to avoid requests with empty IDs.
  • Finish migrating per-resource relationship linkages helpers onto getResourceLinkages.
  • Standardize relationship client HTTP method usage and relationship-aware JSON unmarshal errors.

Why

  • Prevents confusing API errors caused by empty path segments / empty linkage payloads.
  • Reduces duplicated pagination/nextURL logic across relationship clients.
  • Makes relationship client implementations consistent and easier to maintain.

Test Plan

  • make format
  • make lint
  • ASC_BYPASS_KEYCHAIN=1 make test

🔄 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/641 **Author:** [@rudrankriyam](https://github.com/rudrankriyam) **Created:** 2/18/2026 **Status:** ✅ Merged **Merged:** 2/18/2026 **Merged by:** [@rudrankriyam](https://github.com/rudrankriyam) **Base:** `main` ← **Head:** `fix/relationships-audit-followups` --- ### 📝 Commits (5) - [`0959530`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/0959530a5e2e6cdc55a0a5c65850693d09dcd6a9) docs: note Game Center spec discrepancy - [`2ca0840`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/2ca08404227cb86bbca663eb61e405ca6845f218) fix(asc): validate IDs for relationship add/remove - [`f79a9f8`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/f79a9f858b9986047a4a2f722716006ee83f63cb) refactor(asc): consolidate relationship linkages helpers - [`e03f0fe`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/e03f0feb7b3491952cf1fa38c07772d98cfc93eb) refactor(asc): standardize relationship HTTP + errors - [`b166592`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/b16659289132f119dbd9a6444155aaecf23170a7) fix(asc): correct challengesMinimumPlatformVersions linkage type ### 📊 Changes **23 files changed** (+599 additions, -871 deletions) <details> <summary>View changed files</summary> 📝 `docs/API_NOTES.md` (+3 -0) 📝 `internal/asc/client_app_encryption_relationships.go` (+8 -7) 📝 `internal/asc/client_app_info_relationships.go` (+33 -76) 📝 `internal/asc/client_apps_relationships.go` (+9 -32) 📝 `internal/asc/client_build_relationships.go` (+23 -44) 📝 `internal/asc/client_bundle_id_relationships.go` (+14 -31) 📝 `internal/asc/client_game_center_achievements_relationships.go` (+3 -3) 📝 `internal/asc/client_game_center_activities_relationships.go` (+42 -6) 📝 `internal/asc/client_game_center_app_versions_relationships.go` (+21 -3) 📝 `internal/asc/client_game_center_challenges_relationships.go` (+2 -2) 📝 `internal/asc/client_game_center_details_relationships.go` (+11 -33) 📝 `internal/asc/client_game_center_enabled_versions_relationships.go` (+20 -2) 📝 `internal/asc/client_game_center_groups_relationships.go` (+9 -32) 📝 `internal/asc/client_game_center_leaderboards_relationships.go` (+40 -66) 📝 `internal/asc/client_game_center_leaderboards_relationships_v2.go` (+18 -63) 📝 `internal/asc/client_game_center_localizations_relationships.go` (+3 -3) ➕ `internal/asc/client_game_center_relationships_validation_test.go` (+176 -0) 📝 `internal/asc/client_http_issue_616_game_center_detail_group_relationships_test.go` (+1 -1) 📝 `internal/asc/client_linkages_generic.go` (+1 -1) 📝 `internal/asc/client_prerelease_relationships.go` (+12 -33) _...and 3 more files_ </details> ### 📄 Description ## What Implements the follow-ups from the relationship endpoints audit: - Verify + document live API behavior for `gameCenterDetails.challengesMinimumPlatformVersions` (replace-only; `appStoreVersions` linkages; requires live versions; rejects `gameCenterAppVersions`). - Align `UpdateGameCenterDetailChallengesMinimumPlatformVersionsRelationship` request type + tests to `appStoreVersions`. - Add input validation for Game Center relationship add/remove helpers to avoid requests with empty IDs. - Finish migrating per-resource relationship linkages helpers onto `getResourceLinkages`. - Standardize relationship client HTTP method usage and relationship-aware JSON unmarshal errors. ## Why - Prevents confusing API errors caused by empty path segments / empty linkage payloads. - Reduces duplicated pagination/nextURL logic across relationship clients. - Makes relationship client implementations consistent and easier to maintain. ## Test Plan - `make format` - `make lint` - `ASC_BYPASS_KEYCHAIN=1 make test` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 22:32:04 +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#675
No description provided.