[PR #39] [MERGED] Add --paginate flag to automatically fetch all pages #247

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

📋 Pull Request Information

Original PR: https://github.com/rudrankriyam/App-Store-Connect-CLI/pull/39
Author: @rudrankriyam
Created: 1/21/2026
Status: Merged
Merged: 1/21/2026
Merged by: @rudrankriyam

Base: mainHead: feature/paginate-flag


📝 Commits (6)

  • a0818ae Add --paginate flag to automatically fetch all pages
  • a85ec81 Add --paginate to analytics requests command
  • 8046356 Update CLAUDE.md with --paginate flag documentation
  • a9f4739 Update README.md with --paginate flag documentation
  • 72352b6 Add retry logic with exponential backoff for rate limiting
  • 91b8601 Fix retry logic issues from code review

📊 Changes

10 files changed (+662 additions, -21 deletions)

View changed files

📝 Agents.md (+38 -0)
📝 README.md (+21 -10)
📝 cmd/analytics.go (+23 -1)
📝 cmd/beta.go (+44 -2)
📝 cmd/commands.go (+115 -5)
📝 cmd/localizations.go (+39 -1)
📝 cmd/sandbox.go (+23 -1)
📝 cmd/versions.go (+22 -1)
📝 internal/asc/analytics.go (+10 -0)
📝 internal/asc/client.go (+327 -0)

📄 Description

Summary

Implement opt-in pagination for list commands to aggregate results across multiple pages. When --paginate is used, the CLI automatically fetches all available pages (up to 200 items per page) and returns the combined results.

Commands Updated

  • asc feedback --paginate
  • asc crashes --paginate
  • asc reviews --paginate
  • asc apps --paginate
  • asc builds list --paginate
  • asc versions list --paginate
  • asc localizations list --paginate
  • asc beta-groups list --paginate
  • asc beta-testers list --paginate
  • asc sandbox list --paginate

Key Design Decisions

  1. Opt-in (default false) for backward compatibility - existing scripts are unaffected
  2. Automatically uses limit=200 for consistent pagination speed
  3. Clears links in aggregated response to avoid confusing consumers about more pages
  4. Type validation for multi-page responses to prevent panics
  5. Error messages indicate which page failed (e.g., "page 3: network error")

Changes Made

  • Added PaginateAll helper function in internal/asc/client.go
  • Added --paginate flag to all list commands
  • Added type validation to prevent panics on unexpected response types
  • Updated help text with pagination examples

Testing

  • All existing tests pass
  • Code reviewed with Codex for potential issues

🤖 Generated with Claude Code


🔄 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/39 **Author:** [@rudrankriyam](https://github.com/rudrankriyam) **Created:** 1/21/2026 **Status:** ✅ Merged **Merged:** 1/21/2026 **Merged by:** [@rudrankriyam](https://github.com/rudrankriyam) **Base:** `main` ← **Head:** `feature/paginate-flag` --- ### 📝 Commits (6) - [`a0818ae`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/a0818ae9589e762cf97fb9e918da30abec9731a6) Add --paginate flag to automatically fetch all pages - [`a85ec81`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/a85ec81e2df3400c823f5ba487ca6dfbb005dd13) Add --paginate to analytics requests command - [`8046356`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/8046356ba0a948ac3216bf334dd22182bf6ca7ee) Update CLAUDE.md with --paginate flag documentation - [`a9f4739`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/a9f4739fcc44458a6242633e631a6322e19a55ff) Update README.md with --paginate flag documentation - [`72352b6`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/72352b6515756459b11c58eaf28e44ef144259b5) Add retry logic with exponential backoff for rate limiting - [`91b8601`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/91b86013332b39952b2cf84be9975f99f138a577) Fix retry logic issues from code review ### 📊 Changes **10 files changed** (+662 additions, -21 deletions) <details> <summary>View changed files</summary> 📝 `Agents.md` (+38 -0) 📝 `README.md` (+21 -10) 📝 `cmd/analytics.go` (+23 -1) 📝 `cmd/beta.go` (+44 -2) 📝 `cmd/commands.go` (+115 -5) 📝 `cmd/localizations.go` (+39 -1) 📝 `cmd/sandbox.go` (+23 -1) 📝 `cmd/versions.go` (+22 -1) 📝 `internal/asc/analytics.go` (+10 -0) 📝 `internal/asc/client.go` (+327 -0) </details> ### 📄 Description ## Summary Implement opt-in pagination for list commands to aggregate results across multiple pages. When `--paginate` is used, the CLI automatically fetches all available pages (up to 200 items per page) and returns the combined results. ## Commands Updated - `asc feedback --paginate` - `asc crashes --paginate` - `asc reviews --paginate` - `asc apps --paginate` - `asc builds list --paginate` - `asc versions list --paginate` - `asc localizations list --paginate` - `asc beta-groups list --paginate` - `asc beta-testers list --paginate` - `asc sandbox list --paginate` ## Key Design Decisions 1. **Opt-in (default false)** for backward compatibility - existing scripts are unaffected 2. **Automatically uses limit=200** for consistent pagination speed 3. **Clears links in aggregated response** to avoid confusing consumers about more pages 4. **Type validation** for multi-page responses to prevent panics 5. **Error messages indicate which page failed** (e.g., "page 3: network error") ## Changes Made - Added `PaginateAll` helper function in `internal/asc/client.go` - Added `--paginate` flag to all list commands - Added type validation to prevent panics on unexpected response types - Updated help text with pagination examples ## Testing - All existing tests pass - Code reviewed with Codex for potential issues 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 21:34:17 +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#247
No description provided.