[GH-ISSUE #467] Parity: Global list endpoints for beta groups, beta build localizations, and review submissions #131

Closed
opened 2026-02-26 21:33:40 +03:00 by kerem · 3 comments
Owner

Originally created by @rudrankriyam on GitHub (Feb 10, 2026).
Original GitHub issue: https://github.com/rudrankriyam/App-Store-Connect-CLI/issues/467

Overview

Add parity support for the top-level list endpoints that are still missing, while keeping the existing app/build-scoped list flows unchanged.

Scope (OpenAPI resources)

  • GET /v1/betaGroups
  • GET /v1/betaBuildLocalizations
  • GET /v1/reviewSubmissions

Current state

These list surfaces already exist in app/build-scoped form:

  • GET /v1/apps/{id}/betaGroups
  • GET /v1/builds/{id}/betaBuildLocalizations
  • GET /v1/apps/{id}/reviewSubmissions

The top-level list entrypoints are still missing.

Proposed CLI

Keep existing commands, add explicit global mode:

  • asc testflight beta-groups list --global
  • asc beta-build-localizations list --global
  • asc review submissions-list --global

Examples:

  • asc testflight beta-groups list --app "APP_ID"
  • asc testflight beta-groups list --global --limit 50
  • asc beta-build-localizations list --build "BUILD_ID"
  • asc beta-build-localizations list --global --paginate
  • asc review submissions-list --app "APP_ID"
  • asc review submissions-list --global --platform IOS --state READY_FOR_REVIEW

Flag patterns

Common: --global, --app, --build, --limit, --next, --paginate, --output, --pretty

Validation rules:

  • beta-groups list: require one of --app or --global (unless --next is provided)
  • beta-build-localizations list: require one of --build or --global (unless --next is provided)
  • review submissions-list: require one of --app or --global (unless --next is provided)
  • --global is mutually exclusive with --app/--build

Detailed TODO

  • Add client support for top-level list routes (dedicated methods or route-switching wrappers):
    • GET /v1/betaGroups
    • GET /v1/betaBuildLocalizations
    • GET /v1/reviewSubmissions
  • Preserve existing app/build-scoped list methods for backward compatibility.
  • Add --global flag handling in:
    • internal/cli/testflight/beta_groups.go
    • internal/cli/betabuildlocalizations/beta_build_localizations.go
    • internal/cli/reviews/review_submissions.go
  • Add strict flag validation and clear error messages for invalid combinations.
  • Ensure --next validation and pagination behavior work for both scoped and global route shapes.
  • Update command help examples to include global mode.

Acceptance criteria

  • All three top-level list endpoints are reachable from CLI.
  • Existing scoped commands continue to work exactly as before.
  • --global path works with --limit, --next, --paginate, and output flags.
  • make format, make lint, and make test pass.

Tests

  • HTTP client tests assert exact top-level route path for all 3 endpoints.
  • cmdtests for valid scoped mode and valid --global mode.
  • cmdtests for invalid flag combos (--global + --app/--build).
  • cmdtests for missing required selector flags.
  • pagination tests for global lists (links.next path).

Implementation notes

  • Keep this additive: no behavior regression for scripts using current scoped commands.
  • Prefer explicit global mode over silent route switching for clarity.

References

  • docs/openapi/paths.txt
  • internal/asc/client.go
  • internal/asc/review_submissions.go
  • internal/asc/client_options.go
Originally created by @rudrankriyam on GitHub (Feb 10, 2026). Original GitHub issue: https://github.com/rudrankriyam/App-Store-Connect-CLI/issues/467 # Overview Add parity support for the top-level list endpoints that are still missing, while keeping the existing app/build-scoped list flows unchanged. # Scope (OpenAPI resources) - `GET /v1/betaGroups` - `GET /v1/betaBuildLocalizations` - `GET /v1/reviewSubmissions` # Current state These list surfaces already exist in app/build-scoped form: - `GET /v1/apps/{id}/betaGroups` - `GET /v1/builds/{id}/betaBuildLocalizations` - `GET /v1/apps/{id}/reviewSubmissions` The top-level list entrypoints are still missing. # Proposed CLI Keep existing commands, add explicit global mode: - `asc testflight beta-groups list --global` - `asc beta-build-localizations list --global` - `asc review submissions-list --global` Examples: - `asc testflight beta-groups list --app "APP_ID"` - `asc testflight beta-groups list --global --limit 50` - `asc beta-build-localizations list --build "BUILD_ID"` - `asc beta-build-localizations list --global --paginate` - `asc review submissions-list --app "APP_ID"` - `asc review submissions-list --global --platform IOS --state READY_FOR_REVIEW` # Flag patterns Common: `--global`, `--app`, `--build`, `--limit`, `--next`, `--paginate`, `--output`, `--pretty` Validation rules: - `beta-groups list`: require one of `--app` or `--global` (unless `--next` is provided) - `beta-build-localizations list`: require one of `--build` or `--global` (unless `--next` is provided) - `review submissions-list`: require one of `--app` or `--global` (unless `--next` is provided) - `--global` is mutually exclusive with `--app`/`--build` # Detailed TODO - [ ] Add client support for top-level list routes (dedicated methods or route-switching wrappers): - [ ] `GET /v1/betaGroups` - [ ] `GET /v1/betaBuildLocalizations` - [ ] `GET /v1/reviewSubmissions` - [ ] Preserve existing app/build-scoped list methods for backward compatibility. - [ ] Add `--global` flag handling in: - [ ] `internal/cli/testflight/beta_groups.go` - [ ] `internal/cli/betabuildlocalizations/beta_build_localizations.go` - [ ] `internal/cli/reviews/review_submissions.go` - [ ] Add strict flag validation and clear error messages for invalid combinations. - [ ] Ensure `--next` validation and pagination behavior work for both scoped and global route shapes. - [ ] Update command help examples to include global mode. # Acceptance criteria - [ ] All three top-level list endpoints are reachable from CLI. - [ ] Existing scoped commands continue to work exactly as before. - [ ] `--global` path works with `--limit`, `--next`, `--paginate`, and output flags. - [ ] `make format`, `make lint`, and `make test` pass. # Tests - [ ] HTTP client tests assert exact top-level route path for all 3 endpoints. - [ ] cmdtests for valid scoped mode and valid `--global` mode. - [ ] cmdtests for invalid flag combos (`--global` + `--app`/`--build`). - [ ] cmdtests for missing required selector flags. - [ ] pagination tests for global lists (`links.next` path). # Implementation notes - Keep this additive: no behavior regression for scripts using current scoped commands. - Prefer explicit global mode over silent route switching for clarity. # References - `docs/openapi/paths.txt` - `internal/asc/client.go` - `internal/asc/review_submissions.go` - `internal/asc/client_options.go`
kerem closed this issue 2026-02-26 21:33:40 +03:00
Author
Owner

@rudrankriyam commented on GitHub (Feb 10, 2026):

@cursor Please implement this issue end-to-end.

What to build

Implement parity for the missing top-level list routes while preserving existing scoped list behavior.

Endpoints to add

  • GET /v1/betaGroups
  • GET /v1/betaBuildLocalizations
  • GET /v1/reviewSubmissions

Implementation plan

  1. Client layer (internal/asc)
  • Add global-list support for:
    • beta groups
    • beta build localizations
    • review submissions
  • Keep existing scoped methods unchanged:
    • /v1/apps/{id}/betaGroups
    • /v1/builds/{id}/betaBuildLocalizations
    • /v1/apps/{id}/reviewSubmissions
  • Reuse existing query option builders and validateNextURL handling.
  1. CLI layer (internal/cli)
  • Add --global to:
    • internal/cli/testflight/beta_groups.go (list)
    • internal/cli/betabuildlocalizations/beta_build_localizations.go (list)
    • internal/cli/reviews/review_submissions.go (submissions-list)
  • Validation rules:
    • beta-groups list: one of --app or --global (unless --next provided)
    • beta-build-localizations list: one of --build or --global (unless --next provided)
    • review submissions-list: one of --app or --global (unless --next provided)
    • reject --global + --app/--build combinations
  • Route selection:
    • scoped path when app/build provided
    • top-level path when --global true
  1. Help/examples
  • Add examples for global mode in each command help.

New tests to write

A) Client HTTP tests (internal/asc/client_http_test.go)

Add tests that assert method + path + query behavior:

  • TestGetBetaGroupsGlobal_UsesV1BetaGroupsPath
  • TestGetBetaBuildLocalizationsGlobal_UsesV1BetaBuildLocalizationsPath
  • TestGetReviewSubmissionsGlobal_UsesV1ReviewSubmissionsPath

B) CLI cmdtests (new files)

  1. internal/cli/cmdtest/beta_groups_global_test.go
  • success: asc testflight beta-groups list --global
  • error: --global + --app
  • error: missing selector (--app/--global) when no --next
  1. internal/cli/cmdtest/beta_build_localizations_global_test.go
  • success: asc beta-build-localizations list --global
  • error: --global + --build
  • error: missing selector when no --next
  1. internal/cli/cmdtest/review_submissions_global_test.go
  • success: asc review submissions-list --global
  • error: --global + --app
  • error: missing selector when no --next

C) Pagination + next validation

Extend/adjust existing next-validation tests so global paths are covered and paginated aggregation is validated for:

  • /v1/betaGroups
  • /v1/betaBuildLocalizations
  • /v1/reviewSubmissions

How to test locally

Run exactly:

  • make format
  • make lint
  • make test

Then run targeted tests for fast iteration:

  • go test ./internal/asc -run 'BetaGroupsGlobal|BetaBuildLocalizationsGlobal|ReviewSubmissionsGlobal'
  • go test ./internal/cli/cmdtest -run 'Global|NextValidation'

Done criteria

  • Existing scoped list behavior remains unchanged.
  • New global list mode works and is fully tested.
  • All checks pass (format, lint, test).
<!-- gh-comment-id:3877922653 --> @rudrankriyam commented on GitHub (Feb 10, 2026): @cursor Please implement this issue end-to-end. ## What to build Implement parity for the missing top-level list routes while preserving existing scoped list behavior. ### Endpoints to add - `GET /v1/betaGroups` - `GET /v1/betaBuildLocalizations` - `GET /v1/reviewSubmissions` ### Implementation plan 1. **Client layer (`internal/asc`)** - Add global-list support for: - beta groups - beta build localizations - review submissions - Keep existing scoped methods unchanged: - `/v1/apps/{id}/betaGroups` - `/v1/builds/{id}/betaBuildLocalizations` - `/v1/apps/{id}/reviewSubmissions` - Reuse existing query option builders and `validateNextURL` handling. 2. **CLI layer (`internal/cli`)** - Add `--global` to: - `internal/cli/testflight/beta_groups.go` (`list`) - `internal/cli/betabuildlocalizations/beta_build_localizations.go` (`list`) - `internal/cli/reviews/review_submissions.go` (`submissions-list`) - Validation rules: - `beta-groups list`: one of `--app` or `--global` (unless `--next` provided) - `beta-build-localizations list`: one of `--build` or `--global` (unless `--next` provided) - `review submissions-list`: one of `--app` or `--global` (unless `--next` provided) - reject `--global` + `--app`/`--build` combinations - Route selection: - scoped path when app/build provided - top-level path when `--global` true 3. **Help/examples** - Add examples for global mode in each command help. ## New tests to write ### A) Client HTTP tests (`internal/asc/client_http_test.go`) Add tests that assert method + path + query behavior: - `TestGetBetaGroupsGlobal_UsesV1BetaGroupsPath` - `TestGetBetaBuildLocalizationsGlobal_UsesV1BetaBuildLocalizationsPath` - `TestGetReviewSubmissionsGlobal_UsesV1ReviewSubmissionsPath` ### B) CLI cmdtests (new files) 1. `internal/cli/cmdtest/beta_groups_global_test.go` - success: `asc testflight beta-groups list --global` - error: `--global` + `--app` - error: missing selector (`--app`/`--global`) when no `--next` 2. `internal/cli/cmdtest/beta_build_localizations_global_test.go` - success: `asc beta-build-localizations list --global` - error: `--global` + `--build` - error: missing selector when no `--next` 3. `internal/cli/cmdtest/review_submissions_global_test.go` - success: `asc review submissions-list --global` - error: `--global` + `--app` - error: missing selector when no `--next` ### C) Pagination + next validation Extend/adjust existing next-validation tests so global paths are covered and paginated aggregation is validated for: - `/v1/betaGroups` - `/v1/betaBuildLocalizations` - `/v1/reviewSubmissions` ## How to test locally Run exactly: - `make format` - `make lint` - `make test` Then run targeted tests for fast iteration: - `go test ./internal/asc -run 'BetaGroupsGlobal|BetaBuildLocalizationsGlobal|ReviewSubmissionsGlobal'` - `go test ./internal/cli/cmdtest -run 'Global|NextValidation'` ## Done criteria - Existing scoped list behavior remains unchanged. - New global list mode works and is fully tested. - All checks pass (`format`, `lint`, `test`).
Author
Owner

@cursor[bot] commented on GitHub (Feb 10, 2026):

All tests pass. Here is a summary of everything implemented:

Summary

I implemented full parity for three missing top-level list endpoints while preserving all existing scoped list behavior.

Client layer (internal/asc)

  • ListBetaGroups - GET /v1/betaGroups (global, no app ID required)
  • ListBetaBuildLocalizations - GET /v1/betaBuildLocalizations (global, no build ID required)
  • ListReviewSubmissions - GET /v1/reviewSubmissions (global, no app ID required)

Existing scoped methods (GetBetaGroups, GetBetaBuildLocalizations, GetReviewSubmissions) are unchanged.

CLI layer (internal/cli)

Added --global flag to three commands with validation:

  • asc testflight beta-groups list --global - Require --app or --global (unless --next); reject --global + --app
  • asc beta-build-localizations list --global - Require --build or --global (unless --next); reject --global + --build
  • asc review submissions-list --global - Require --app or --global (unless --next); reject --global + --app

All commands support --limit, --next, --paginate, --output, and --pretty in global mode. Help examples updated for all three commands.

Tests

  • 9 client HTTP tests asserting exact path (/v1/betaGroups, /v1/betaBuildLocalizations, /v1/reviewSubmissions), query params, nextURL handling, and authorization
  • 19 CLI cmdtests across 3 new test files covering: global success, global + limit, global + filters, global pagination, scoped mode backward compat, --next bypass, mutually exclusive flag errors, and missing selector errors
  • Updated 3 existing tests with new error messages
  • make format, make lint, and make test all pass

View PR

Open in Cursor Open in Web

<!-- gh-comment-id:3877923177 --> @cursor[bot] commented on GitHub (Feb 10, 2026): All tests pass. Here is a summary of everything implemented: ## Summary I implemented full parity for three missing top-level list endpoints while preserving all existing scoped list behavior. ### Client layer (`internal/asc`) - **`ListBetaGroups`** - `GET /v1/betaGroups` (global, no app ID required) - **`ListBetaBuildLocalizations`** - `GET /v1/betaBuildLocalizations` (global, no build ID required) - **`ListReviewSubmissions`** - `GET /v1/reviewSubmissions` (global, no app ID required) Existing scoped methods (`GetBetaGroups`, `GetBetaBuildLocalizations`, `GetReviewSubmissions`) are unchanged. ### CLI layer (`internal/cli`) Added `--global` flag to three commands with validation: - **`asc testflight beta-groups list --global`** - Require `--app` or `--global` (unless `--next`); reject `--global` + `--app` - **`asc beta-build-localizations list --global`** - Require `--build` or `--global` (unless `--next`); reject `--global` + `--build` - **`asc review submissions-list --global`** - Require `--app` or `--global` (unless `--next`); reject `--global` + `--app` All commands support `--limit`, `--next`, `--paginate`, `--output`, and `--pretty` in global mode. Help examples updated for all three commands. ### Tests - **9 client HTTP tests** asserting exact path (`/v1/betaGroups`, `/v1/betaBuildLocalizations`, `/v1/reviewSubmissions`), query params, `nextURL` handling, and authorization - **19 CLI cmdtests** across 3 new test files covering: global success, global + limit, global + filters, global pagination, scoped mode backward compat, `--next` bypass, mutually exclusive flag errors, and missing selector errors - Updated 3 existing tests with new error messages - `make format`, `make lint`, and `make test` all pass <p><a href="https://github.com/rudrankriyam/App-Store-Connect-CLI/pull/473"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/view-pr-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/view-pr-light.png"><img alt="View PR" width="86" height="28" src="https://cursor.com/assets/images/view-pr-light.png"></picture></a></p> <p><a href="https://cursor.com/background-agent?bcId=bc-333c08e3-3766-412c-ad29-95771d0a49cf"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a>&nbsp;<a href="https://cursor.com/agents?id=bc-333c08e3-3766-412c-ad29-95771d0a49cf"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a></p>
Author
Owner

@rudrankriyam commented on GitHub (Feb 10, 2026):

Implemented and merged in #473, with follow-up parity/regression fixes in #475.

  • Added global list client methods for beta groups, beta build localizations, and review submissions.
  • Added CLI --global support plus cmdtest/client coverage.
  • Follow-up fixed review submissions top-level filter behavior.
    Closing this parity issue as complete.
<!-- gh-comment-id:3878644647 --> @rudrankriyam commented on GitHub (Feb 10, 2026): Implemented and merged in #473, with follow-up parity/regression fixes in #475. - Added global list client methods for beta groups, beta build localizations, and review submissions. - Added CLI --global support plus cmdtest/client coverage. - Follow-up fixed review submissions top-level filter behavior. Closing this parity issue as complete.
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#131
No description provided.