[GH-ISSUE #192] Add App Store Review Attachments CLI support #53

Closed
opened 2026-02-26 21:33:02 +03:00 by kerem · 1 comment
Owner

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

Overview

Add CLI support for App Store Review Attachments so we can upload/remove files that reviewers need. This depends on App Store Review Details.

Docs (API)

Scope (Endpoints)

  • GET /v1/appStoreReviewAttachments/{id}
  • GET /v1/appStoreReviewDetails/{id}/appStoreReviewAttachments
  • GET /v1/appStoreReviewDetails/{id}/relationships/appStoreReviewAttachments
  • POST /v1/appStoreReviewAttachments
  • PATCH /v1/appStoreReviewAttachments/{id} (commit)
  • DELETE /v1/appStoreReviewAttachments/{id}

Proposed CLI

Top-level group (suggested): asc review-attachments <subcommand> [flags]

Subcommands:

  • review-attachments list --review-detail REVIEW_DETAIL_ID
  • review-attachments get --id ATTACHMENT_ID
  • review-attachments upload --review-detail REVIEW_DETAIL_ID --file ./attachment.pdf
  • review-attachments delete --id ATTACHMENT_ID --confirm

Upload Flow (expected)

  • Create attachment → receive upload operations
  • Execute upload operations (re-use upload helper pattern from assets/builds)
  • Commit attachment via PATCH (include checksum + uploaded flag, as required)
  • Optional --wait to poll for processing state (if available in response)

Flag Patterns

Common:

  • --output json|table|markdown
  • --pretty

Upload:

  • --review-detail (required)
  • --file (required)

Delete:

  • --confirm required

Output

  • JSON (minified) by default
  • Table/markdown for list/get
  • Upload result should include: attachment ID, file name, state, and review detail ID

Acceptance Criteria

  • asc review-attachments --help is available
  • Upload/list/get/delete works against live App Store Connect
  • Upload uses safe file handling (no symlinks, size guardrails)
  • Delete requires --confirm
  • JSON/table/markdown output

Tests

  • CLI validation tests (missing --review-detail, missing --file, missing --confirm)
  • Client HTTP tests for create/get/delete/commit
  • Upload tests with mocked presigned URLs (SSRF-safe validation)
  • Output tests for table/markdown

Manual Test Plan (using real apps)

Prereq: Create App Store Review Details for a version (issue #191).

  1. Create review details → get REVIEW_DETAIL_ID
  2. Upload attachment:
    • asc review-attachments upload --review-detail REVIEW_DETAIL_ID --file ./review-doc.pdf
  3. List attachments:
    • asc review-attachments list --review-detail REVIEW_DETAIL_ID
  4. Get by id:
    • asc review-attachments get --id ATTACHMENT_ID
  5. Delete:
    • asc review-attachments delete --id ATTACHMENT_ID --confirm

Notes

  • Apple has intermittent 500s for review attachments in some contexts (see forums). Log clear errors and return non-zero exit codes.
  • Consider a maximum file size guardrail similar to assets.

Implementation Notes

  • Add cmd/review_attachments.go
  • Add internal/asc/review_attachments.go + output helpers
  • Reuse upload helpers from assets/builds (upload operations, checksum)
  • Register command in cmd/root.go
Originally created by @rudrankriyam on GitHub (Jan 26, 2026). Original GitHub issue: https://github.com/rudrankriyam/App-Store-Connect-CLI/issues/192 # Overview Add CLI support for **App Store Review Attachments** so we can upload/remove files that reviewers need. This depends on App Store Review Details. # Docs (API) - App Store Review Attachments: https://sosumi.ai/documentation/appstoreconnectapi/app-store-review-attachments - App Store Review Details: https://sosumi.ai/documentation/appstoreconnectapi/app-store-review-details # Scope (Endpoints) - `GET /v1/appStoreReviewAttachments/{id}` - `GET /v1/appStoreReviewDetails/{id}/appStoreReviewAttachments` - `GET /v1/appStoreReviewDetails/{id}/relationships/appStoreReviewAttachments` - `POST /v1/appStoreReviewAttachments` - `PATCH /v1/appStoreReviewAttachments/{id}` (commit) - `DELETE /v1/appStoreReviewAttachments/{id}` # Proposed CLI Top-level group (suggested): `asc review-attachments <subcommand> [flags]` Subcommands: - `review-attachments list --review-detail REVIEW_DETAIL_ID` - `review-attachments get --id ATTACHMENT_ID` - `review-attachments upload --review-detail REVIEW_DETAIL_ID --file ./attachment.pdf` - `review-attachments delete --id ATTACHMENT_ID --confirm` # Upload Flow (expected) - Create attachment → receive upload operations - Execute upload operations (re-use upload helper pattern from assets/builds) - Commit attachment via PATCH (include checksum + uploaded flag, as required) - Optional `--wait` to poll for processing state (if available in response) # Flag Patterns Common: - `--output json|table|markdown` - `--pretty` Upload: - `--review-detail` (required) - `--file` (required) Delete: - `--confirm` required # Output - JSON (minified) by default - Table/markdown for list/get - Upload result should include: attachment ID, file name, state, and review detail ID # Acceptance Criteria - [ ] `asc review-attachments --help` is available - [ ] Upload/list/get/delete works against live App Store Connect - [ ] Upload uses safe file handling (no symlinks, size guardrails) - [ ] Delete requires `--confirm` - [ ] JSON/table/markdown output # Tests - CLI validation tests (missing --review-detail, missing --file, missing --confirm) - Client HTTP tests for create/get/delete/commit - Upload tests with mocked presigned URLs (SSRF-safe validation) - Output tests for table/markdown # Manual Test Plan (using real apps) Prereq: Create App Store Review Details for a version (issue #191). 1) Create review details → get `REVIEW_DETAIL_ID` 2) Upload attachment: - `asc review-attachments upload --review-detail REVIEW_DETAIL_ID --file ./review-doc.pdf` 3) List attachments: - `asc review-attachments list --review-detail REVIEW_DETAIL_ID` 4) Get by id: - `asc review-attachments get --id ATTACHMENT_ID` 5) Delete: - `asc review-attachments delete --id ATTACHMENT_ID --confirm` # Notes - Apple has intermittent 500s for review attachments in some contexts (see forums). Log clear errors and return non-zero exit codes. - Consider a maximum file size guardrail similar to assets. # Implementation Notes - Add `cmd/review_attachments.go` - Add `internal/asc/review_attachments.go` + output helpers - Reuse upload helpers from assets/builds (upload operations, checksum) - Register command in `cmd/root.go`
kerem closed this issue 2026-02-26 21:33:02 +03:00
Author
Owner

@rudrankriyam commented on GitHub (Jan 27, 2026):

Implemented App Store review details + attachments in main.

<!-- gh-comment-id:3805377679 --> @rudrankriyam commented on GitHub (Jan 27, 2026): Implemented App Store review details + attachments in main.
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#53
No description provided.