[PR #663] [MERGED] feat: add local webhook receiver command #692

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

📋 Pull Request Information

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

Base: mainHead: feat/webhooks-serve-590


📝 Commits (6)

  • 8d45396 feat: add local webhook receiver command
  • 0cd7a24 Fix webhook serve max-body overflow and drop redundant unmarshal
  • cb70aa0 Merge pull request #665 from rudrankriyam/cursor/webhook-serving-issues-6363
  • a0b1a23 fix: enforce strict webhook payload size checks
  • be53483 Remove unreachable webhook body size check
  • 903410b Merge pull request #667 from rudrankriyam/cursor/webhooks-body-size-dead-code-d37b

📊 Changes

4 files changed (+849 additions, -0 deletions)

View changed files

📝 internal/cli/cmdtest/webhooks_test.go (+25 -0)
📝 internal/cli/webhooks/webhooks.go (+2 -0)
internal/cli/webhooks/webhooks_serve.go (+446 -0)
internal/cli/webhooks/webhooks_serve_test.go (+376 -0)

📄 Description

Closes #590

Summary

  • add asc webhooks serve with --host, --port, --dir, --exec, --output, and --max-body-bytes
  • validate webhook payloads as JSON, enforce body-size limits, and return fast 202 Accepted responses
  • log concise per-event summaries, optionally persist each payload to disk with safe no-symlink writes, and optionally execute a command with payload JSON on stdin
  • add tests for serve validation, synthetic POST handling, payload persistence, and exec piping

Test plan

  • go test ./internal/cli/webhooks ./internal/cli/cmdtest -run Webhooks
  • make format
  • make lint
  • ASC_BYPASS_KEYCHAIN=1 make test

🔄 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/663 **Author:** [@rudrankriyam](https://github.com/rudrankriyam) **Created:** 2/20/2026 **Status:** ✅ Merged **Merged:** 2/20/2026 **Merged by:** [@rudrankriyam](https://github.com/rudrankriyam) **Base:** `main` ← **Head:** `feat/webhooks-serve-590` --- ### 📝 Commits (6) - [`8d45396`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/8d45396fc91a084343074c18fbed9e8aca8a4558) feat: add local webhook receiver command - [`0cd7a24`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/0cd7a24605113598e4fd2d8bac27d3708663622c) Fix webhook serve max-body overflow and drop redundant unmarshal - [`cb70aa0`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/cb70aa072f7fb0ca2fd7c3bf889e603773b1eca5) Merge pull request #665 from rudrankriyam/cursor/webhook-serving-issues-6363 - [`a0b1a23`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/a0b1a237371a9d476fdf8d8fd213e0bb863e9a4c) fix: enforce strict webhook payload size checks - [`be53483`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/be534839841634224e34cfc2665036372614c178) Remove unreachable webhook body size check - [`903410b`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/903410b7865fa40fffc438b214f2af97c9a321e9) Merge pull request #667 from rudrankriyam/cursor/webhooks-body-size-dead-code-d37b ### 📊 Changes **4 files changed** (+849 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `internal/cli/cmdtest/webhooks_test.go` (+25 -0) 📝 `internal/cli/webhooks/webhooks.go` (+2 -0) ➕ `internal/cli/webhooks/webhooks_serve.go` (+446 -0) ➕ `internal/cli/webhooks/webhooks_serve_test.go` (+376 -0) </details> ### 📄 Description Closes #590 ## Summary - add `asc webhooks serve` with `--host`, `--port`, `--dir`, `--exec`, `--output`, and `--max-body-bytes` - validate webhook payloads as JSON, enforce body-size limits, and return fast `202 Accepted` responses - log concise per-event summaries, optionally persist each payload to disk with safe no-symlink writes, and optionally execute a command with payload JSON on stdin - add tests for serve validation, synthetic POST handling, payload persistence, and exec piping ## Test plan - [x] `go test ./internal/cli/webhooks ./internal/cli/cmdtest -run Webhooks` - [x] `make format` - [x] `make lint` - [x] `ASC_BYPASS_KEYCHAIN=1 make test` --- <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:08 +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#692
No description provided.