[PR #743] [MERGED] Add submit validate subcommand for pre-submission checks #756

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

📋 Pull Request Information

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

Base: mainHead: feedback/submit-validate


📝 Commits (2)

  • a25bacf feat(submit): add submit validate subcommand for pre-submission checks
  • 974830e refactor(validate): unify pre-submission checks under asc validate

📊 Changes

6 files changed (+281 additions, -32 deletions)

View changed files

📝 internal/cli/cmdtest/validate_test.go (+142 -4)
📝 internal/cli/validate/validate.go (+62 -15)
📝 internal/validation/report.go (+1 -1)
📝 internal/validation/required_fields.go (+39 -1)
📝 internal/validation/required_fields_test.go (+31 -7)
📝 internal/validation/types.go (+6 -4)

📄 Description

Summary

  • Adds asc submit validate for live API pre-submission readiness checks
  • Returns structured results with issues list, severity, error/warning counts, and ready status
  • Returns non-zero exit code when errors are found

Checks performed

  1. Version state — verifies version is in an editable state (PREPARE_FOR_SUBMISSION, DEVELOPER_REJECTED, etc.)
  2. Build attached — verifies a build is linked to the version
  3. Version localizations — checks description (error if empty) and keywords (warning if empty) per locale
  4. Screenshots — checks screenshot sets exist per localization (error if none)
  5. App info localizations — checks app name is set (error) and privacy policy URL (warning) per locale
  6. Age rating — verifies age rating declaration exists

Usage

asc submit validate --app "123456789" --version "1.0.0"
asc submit validate --app "123456789" --version-id "VERSION_ID"
asc submit validate --app "123456789" --version "1.0.0" --output table

Files changed

  • internal/cli/submit/validate.go — command, validation logic, table/markdown renderers (~321 lines)
  • internal/cli/submit/submit.go — registers SubmitValidateCommand() (+1 line)
  • internal/cli/submit/submit_test.go — updates TestSubmitCommandShape subcommand count (3→4)
  • internal/cli/cmdtest/submit_validate_test.go — 6 tests with HTTP mocks (~382 lines)

Test plan

  • TestSubmitValidateRequiresVersionFlag — validates --version or --version-id required
  • TestSubmitValidateRequiresAppFlag — validates --app required
  • TestSubmitValidateVersionAndVersionIDMutuallyExclusive — validates mutual exclusivity
  • TestSubmitValidateAllChecksPass — full mock with all checks passing, asserts ready=true
  • TestSubmitValidateDetectsMissingBuildAndDescription — asserts build/description/screenshots errors detected
  • TestSubmitValidateDetectsNonEditableState — asserts WAITING_FOR_REVIEW flagged as non-editable
  • ASC_BYPASS_KEYCHAIN=1 make test — all tests pass

🔄 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/743 **Author:** [@omar16100](https://github.com/omar16100) **Created:** 2/23/2026 **Status:** ✅ Merged **Merged:** 2/23/2026 **Merged by:** [@rudrankriyam](https://github.com/rudrankriyam) **Base:** `main` ← **Head:** `feedback/submit-validate` --- ### 📝 Commits (2) - [`a25bacf`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/a25bacff7bcf9d0027ccf2d0ff8f65d805fcc68e) feat(submit): add submit validate subcommand for pre-submission checks - [`974830e`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/974830e652693e0d85f33c02690299ff0f9968d7) refactor(validate): unify pre-submission checks under asc validate ### 📊 Changes **6 files changed** (+281 additions, -32 deletions) <details> <summary>View changed files</summary> 📝 `internal/cli/cmdtest/validate_test.go` (+142 -4) 📝 `internal/cli/validate/validate.go` (+62 -15) 📝 `internal/validation/report.go` (+1 -1) 📝 `internal/validation/required_fields.go` (+39 -1) 📝 `internal/validation/required_fields_test.go` (+31 -7) 📝 `internal/validation/types.go` (+6 -4) </details> ### 📄 Description ## Summary - Adds `asc submit validate` for live API pre-submission readiness checks - Returns structured results with issues list, severity, error/warning counts, and ready status - Returns non-zero exit code when errors are found ## Checks performed 1. **Version state** — verifies version is in an editable state (PREPARE_FOR_SUBMISSION, DEVELOPER_REJECTED, etc.) 2. **Build attached** — verifies a build is linked to the version 3. **Version localizations** — checks description (error if empty) and keywords (warning if empty) per locale 4. **Screenshots** — checks screenshot sets exist per localization (error if none) 5. **App info localizations** — checks app name is set (error) and privacy policy URL (warning) per locale 6. **Age rating** — verifies age rating declaration exists ## Usage ```bash asc submit validate --app "123456789" --version "1.0.0" asc submit validate --app "123456789" --version-id "VERSION_ID" asc submit validate --app "123456789" --version "1.0.0" --output table ``` ## Files changed - `internal/cli/submit/validate.go` — command, validation logic, table/markdown renderers (~321 lines) - `internal/cli/submit/submit.go` — registers `SubmitValidateCommand()` (+1 line) - `internal/cli/submit/submit_test.go` — updates `TestSubmitCommandShape` subcommand count (3→4) - `internal/cli/cmdtest/submit_validate_test.go` — 6 tests with HTTP mocks (~382 lines) ## Test plan - [x] `TestSubmitValidateRequiresVersionFlag` — validates --version or --version-id required - [x] `TestSubmitValidateRequiresAppFlag` — validates --app required - [x] `TestSubmitValidateVersionAndVersionIDMutuallyExclusive` — validates mutual exclusivity - [x] `TestSubmitValidateAllChecksPass` — full mock with all checks passing, asserts ready=true - [x] `TestSubmitValidateDetectsMissingBuildAndDescription` — asserts build/description/screenshots errors detected - [x] `TestSubmitValidateDetectsNonEditableState` — asserts WAITING_FOR_REVIEW flagged as non-editable - [x] `ASC_BYPASS_KEYCHAIN=1 make test` — all tests pass --- <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:25 +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#756
No description provided.