[PR #301] [MERGED] Add webhooks CLI commands #425

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

📋 Pull Request Information

Original PR: https://github.com/rudrankriyam/App-Store-Connect-CLI/pull/301
Author: @swiftlysingh
Created: 1/29/2026
Status: Merged
Merged: 1/30/2026
Merged by: @rudrankriyam

Base: mainHead: feat/webhooks-cli


📝 Commits (6)

  • 408cdec Add webhooks client models and requests
  • 64c3792 Add webhooks output formatting
  • a0d56d1 Add webhooks CLI commands
  • 2eae4d7 Merge branch 'main' into feat/webhooks-cli
  • 9e9e48f fix: align webhook deliveries filters with ASC API
  • 7e32cfc Merge remote-tracking branch 'origin/main' into feat/webhooks-cli

📊 Changes

15 files changed (+1987 additions, -105 deletions)

View changed files

internal/asc/client_http_webhooks_test.go (+276 -0)
📝 internal/asc/client_options.go (+105 -0)
📝 internal/asc/client_queries.go (+38 -1)
📝 internal/asc/client_types.go (+107 -104)
internal/asc/client_webhooks.go (+217 -0)
📝 internal/asc/output_core.go (+24 -0)
internal/asc/output_webhooks.go (+114 -0)
internal/asc/output_webhooks_test.go (+156 -0)
internal/asc/webhooks.go (+143 -0)
internal/cli/cmdtest/webhooks_test.go (+128 -0)
📝 internal/cli/registry/registry.go (+2 -0)
internal/cli/webhooks/shared_wrappers.go (+38 -0)
internal/cli/webhooks/webhooks.go (+593 -0)
internal/cli/webhooks/webhooks_helpers.go (+30 -0)
internal/cli/webhooks/webhooks_helpers_test.go (+16 -0)

📄 Description

Closes #248

Summary

  • Add webhooks client models, request/response types, and query helpers for v1 webhooks, deliveries, and pings.
  • Implement HTTP client methods for CRUD, deliveries list, redeliver, ping, and app relationship endpoints.
  • Add output formatting for JSON/table/markdown for webhooks, deliveries, ping, and delete results.
  • Add CLI commands: webhooks list/get/create/update/delete, deliveries list/redeliver, ping.
  • Register webhooks commands in CLI registry and add resource type constants.
  • Remove deliveries --delivery-state filter; require --created-after or --created-before because ASC rejects deliveryState filters in live API.

Tests

  • make test

Notes

  • E2E: create/list/get/update/ping/deliveries list works using --created-after (ASC requires a filter within 10 days).
  • Redeliver is inconsistent: succeeded for a failed delivery (httpstat.us/500), but ASC returned a generic server error when redelivering a webhook.site delivery.

🔄 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/301 **Author:** [@swiftlysingh](https://github.com/swiftlysingh) **Created:** 1/29/2026 **Status:** ✅ Merged **Merged:** 1/30/2026 **Merged by:** [@rudrankriyam](https://github.com/rudrankriyam) **Base:** `main` ← **Head:** `feat/webhooks-cli` --- ### 📝 Commits (6) - [`408cdec`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/408cdec040a6a73016f1a2a36f8005d120940493) Add webhooks client models and requests - [`64c3792`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/64c379272e55ba99c64ec025cc9115e7ee28c236) Add webhooks output formatting - [`a0d56d1`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/a0d56d1634f87bb77ed0469487d763ab963fa1c8) Add webhooks CLI commands - [`2eae4d7`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/2eae4d7d74597dc44c6c07dd7b7fcbf1dd0bc344) Merge branch 'main' into feat/webhooks-cli - [`9e9e48f`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/9e9e48f31a84ad2086452cd2d68abcb106c2a9d7) fix: align webhook deliveries filters with ASC API - [`7e32cfc`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/7e32cfcf2fc825e8fcf51e855771116db90f01ee) Merge remote-tracking branch 'origin/main' into feat/webhooks-cli ### 📊 Changes **15 files changed** (+1987 additions, -105 deletions) <details> <summary>View changed files</summary> ➕ `internal/asc/client_http_webhooks_test.go` (+276 -0) 📝 `internal/asc/client_options.go` (+105 -0) 📝 `internal/asc/client_queries.go` (+38 -1) 📝 `internal/asc/client_types.go` (+107 -104) ➕ `internal/asc/client_webhooks.go` (+217 -0) 📝 `internal/asc/output_core.go` (+24 -0) ➕ `internal/asc/output_webhooks.go` (+114 -0) ➕ `internal/asc/output_webhooks_test.go` (+156 -0) ➕ `internal/asc/webhooks.go` (+143 -0) ➕ `internal/cli/cmdtest/webhooks_test.go` (+128 -0) 📝 `internal/cli/registry/registry.go` (+2 -0) ➕ `internal/cli/webhooks/shared_wrappers.go` (+38 -0) ➕ `internal/cli/webhooks/webhooks.go` (+593 -0) ➕ `internal/cli/webhooks/webhooks_helpers.go` (+30 -0) ➕ `internal/cli/webhooks/webhooks_helpers_test.go` (+16 -0) </details> ### 📄 Description Closes #248 ## Summary - Add webhooks client models, request/response types, and query helpers for v1 webhooks, deliveries, and pings. - Implement HTTP client methods for CRUD, deliveries list, redeliver, ping, and app relationship endpoints. - Add output formatting for JSON/table/markdown for webhooks, deliveries, ping, and delete results. - Add CLI commands: webhooks list/get/create/update/delete, deliveries list/redeliver, ping. - Register webhooks commands in CLI registry and add resource type constants. - Remove deliveries `--delivery-state` filter; require `--created-after` or `--created-before` because ASC rejects deliveryState filters in live API. ## Tests - make test ## Notes - E2E: create/list/get/update/ping/deliveries list works using `--created-after` (ASC requires a filter within 10 days). - Redeliver is inconsistent: succeeded for a failed delivery (httpstat.us/500), but ASC returned a generic server error when redelivering a webhook.site delivery. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 22:30:53 +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#425
No description provided.