[GH-ISSUE #205] Add Xcode Cloud artifacts, test results, and issues CLI support #67

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

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

Originally assigned to: @swiftlysingh on GitHub.

Overview

Add deeper Xcode Cloud visibility: list artifacts, test results, and issues for build actions, plus fetch individual artifact/test/issue details. The CLI currently supports workflows, build runs, actions, and status only.

Docs (API)

Scope (Endpoints)

  • GET /v1/ciBuildActions/{id}/artifacts
  • GET /v1/ciBuildActions/{id}/testResults
  • GET /v1/ciBuildActions/{id}/issues
  • GET /v1/ciArtifacts/{id}
  • GET /v1/ciTestResults/{id}
  • GET /v1/ciIssues/{id}
  • Optional: relationships endpoints for linkages (if useful for lightweight list)

Proposed CLI

All under the existing xcode-cloud group:

asc xcode-cloud artifacts list --action-id ACTION_ID
asc xcode-cloud artifacts get --id ARTIFACT_ID
asc xcode-cloud artifacts download --id ARTIFACT_ID --path ./artifact.zip

asc xcode-cloud test-results list --action-id ACTION_ID
asc xcode-cloud test-results get --id TEST_RESULT_ID

asc xcode-cloud issues list --action-id ACTION_ID
asc xcode-cloud issues get --id ISSUE_ID

Flags

Common:

  • --output json|table|markdown
  • --pretty
  • --limit, --next, --paginate

Artifacts download:

  • --path required
  • Safe file handling: reject symlinks, fail if path exists unless --overwrite

Output

  • JSON (minified) by default
  • Table/markdown for list/get
  • Artifacts list should surface name, kind, size, and download URL (if present)
  • Test results list should show test name, status, duration (if available)
  • Issues list should show file, line, type, message (if available)

Acceptance Criteria

  • asc xcode-cloud artifacts|test-results|issues --help available
  • List endpoints work with pagination
  • Get endpoints return details for a single item
  • Download saves artifact to disk safely
  • JSON/table/markdown output

Tests

  • CLI validation tests (missing --action-id, missing --id, missing --path)
  • Client tests for list/get endpoints
  • Download tests with mocked artifact URL
  • Output tests for table/markdown

Manual Test Plan (using real apps)

  1. Get a build run and action ID:
    • asc xcode-cloud build-runs --workflow-id WORKFLOW_ID --limit 1
    • asc xcode-cloud actions --run-id BUILD_RUN_ID
  2. List artifacts:
    • asc xcode-cloud artifacts list --action-id ACTION_ID
  3. Get artifact details:
    • asc xcode-cloud artifacts get --id ARTIFACT_ID
  4. Download artifact:
    • asc xcode-cloud artifacts download --id ARTIFACT_ID --path ./artifact.zip
  5. List test results (for TEST action):
    • asc xcode-cloud test-results list --action-id TEST_ACTION_ID
  6. Get a test result:
    • asc xcode-cloud test-results get --id TEST_RESULT_ID
  7. List issues:
    • asc xcode-cloud issues list --action-id ACTION_ID
  8. Get issue details:
    • asc xcode-cloud issues get --id ISSUE_ID

Implementation Notes

  • Add CiArtifact/CiTestResult/CiIssue types and response structs in internal/asc/xcode_cloud.go.
  • Add client methods for the six endpoints above.
  • Add output helpers in internal/asc/xcode_cloud_output.go.
  • Add new subcommands in cmd/xcode_cloud.go (or split into a new file), register under xcode-cloud.
Originally created by @rudrankriyam on GitHub (Jan 26, 2026). Original GitHub issue: https://github.com/rudrankriyam/App-Store-Connect-CLI/issues/205 Originally assigned to: @swiftlysingh on GitHub. # Overview Add deeper Xcode Cloud visibility: list artifacts, test results, and issues for build actions, plus fetch individual artifact/test/issue details. The CLI currently supports workflows, build runs, actions, and status only. # Docs (API) - List artifacts for a build action: https://sosumi.ai/documentation/appstoreconnectapi/get-v1-cibuildactions-_id_-artifacts - List test results for a test action: https://sosumi.ai/documentation/appstoreconnectapi/get-v1-cibuildactions-_id_-testresults - List issues for a build action: https://sosumi.ai/documentation/appstoreconnectapi/get-v1-cibuildactions-_id_-issues - Read artifact: https://sosumi.ai/documentation/appstoreconnectapi/get-v1-ciartifacts-_id_ - Read test result: https://sosumi.ai/documentation/appstoreconnectapi/get-v1-citestresults-_id_ - Read issue: https://sosumi.ai/documentation/appstoreconnectapi/get-v1-ciissues-_id_ - CiArtifact object: https://sosumi.ai/documentation/appstoreconnectapi/ciartifact - CiTestResult object: https://sosumi.ai/documentation/appstoreconnectapi/citestresult - CiIssue object: https://sosumi.ai/documentation/appstoreconnectapi/ciissue # Scope (Endpoints) - `GET /v1/ciBuildActions/{id}/artifacts` - `GET /v1/ciBuildActions/{id}/testResults` - `GET /v1/ciBuildActions/{id}/issues` - `GET /v1/ciArtifacts/{id}` - `GET /v1/ciTestResults/{id}` - `GET /v1/ciIssues/{id}` - Optional: relationships endpoints for linkages (if useful for lightweight list) # Proposed CLI All under the existing `xcode-cloud` group: ``` asc xcode-cloud artifacts list --action-id ACTION_ID asc xcode-cloud artifacts get --id ARTIFACT_ID asc xcode-cloud artifacts download --id ARTIFACT_ID --path ./artifact.zip asc xcode-cloud test-results list --action-id ACTION_ID asc xcode-cloud test-results get --id TEST_RESULT_ID asc xcode-cloud issues list --action-id ACTION_ID asc xcode-cloud issues get --id ISSUE_ID ``` # Flags Common: - `--output json|table|markdown` - `--pretty` - `--limit`, `--next`, `--paginate` Artifacts download: - `--path` required - Safe file handling: reject symlinks, fail if path exists unless `--overwrite` # Output - JSON (minified) by default - Table/markdown for list/get - Artifacts list should surface name, kind, size, and download URL (if present) - Test results list should show test name, status, duration (if available) - Issues list should show file, line, type, message (if available) # Acceptance Criteria - [ ] `asc xcode-cloud artifacts|test-results|issues --help` available - [ ] List endpoints work with pagination - [ ] Get endpoints return details for a single item - [ ] Download saves artifact to disk safely - [ ] JSON/table/markdown output # Tests - CLI validation tests (missing --action-id, missing --id, missing --path) - Client tests for list/get endpoints - Download tests with mocked artifact URL - Output tests for table/markdown # Manual Test Plan (using real apps) 1) Get a build run and action ID: - `asc xcode-cloud build-runs --workflow-id WORKFLOW_ID --limit 1` - `asc xcode-cloud actions --run-id BUILD_RUN_ID` 2) List artifacts: - `asc xcode-cloud artifacts list --action-id ACTION_ID` 3) Get artifact details: - `asc xcode-cloud artifacts get --id ARTIFACT_ID` 4) Download artifact: - `asc xcode-cloud artifacts download --id ARTIFACT_ID --path ./artifact.zip` 5) List test results (for TEST action): - `asc xcode-cloud test-results list --action-id TEST_ACTION_ID` 6) Get a test result: - `asc xcode-cloud test-results get --id TEST_RESULT_ID` 7) List issues: - `asc xcode-cloud issues list --action-id ACTION_ID` 8) Get issue details: - `asc xcode-cloud issues get --id ISSUE_ID` # Implementation Notes - Add CiArtifact/CiTestResult/CiIssue types and response structs in `internal/asc/xcode_cloud.go`. - Add client methods for the six endpoints above. - Add output helpers in `internal/asc/xcode_cloud_output.go`. - Add new subcommands in `cmd/xcode_cloud.go` (or split into a new file), register under `xcode-cloud`.
kerem closed this issue 2026-02-26 21:33:09 +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#67
No description provided.