Skip to content

Add webhook authorization header flag - #1393

Merged
mscoutermarsh merged 32 commits into
mainfrom
heyglassy/webhook-authorization-token
Sep 4, 2026
Merged

Add webhook authorization header flag#1393
mscoutermarsh merged 32 commits into
mainfrom
heyglassy/webhook-authorization-token

Conversation

@heyglassy

@heyglassy heyglassy commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add --authorization-header to webhook create and update commands
  • pass the complete header value (for example Bearer token) through as authorization_header; PlanetScale sends it unchanged
  • preserve the configured header when the update flag is omitted
  • add --clear-authorization-header for explicit removal (PATCH with an empty string); set/clear are mutually exclusive
  • expose only authorization_header_configured when reading webhooks
  • add command and HTTP serialization coverage for set, preserve, empty, and clear behavior

Dependency and rollout order

Requires planetscale/api-bb#21652, which is already merged. The API does not return the header value because read_database_webhooks is granted to database members, not just admins.

Testing

  • go test ./internal/cmd/webhook ./internal/planetscale
  • go vet ./internal/cmd/webhook ./internal/planetscale

heyglassy and others added 2 commits September 1, 2026 09:19
Send the complete Authorization header value as authorization_header,
read only authorization_header_configured, and clear by PATCHing an
empty string instead of a dedicated clear field.

Co-authored-by: Cursor <cursoragent@cursor.com>
@mscoutermarsh mscoutermarsh changed the title Add webhook authorization token flag Add webhook authorization header flag Sep 4, 2026
@mscoutermarsh
mscoutermarsh marked this pull request as ready for review September 4, 2026 20:36
@mscoutermarsh
mscoutermarsh requested a review from a team as a code owner September 4, 2026 20:36

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Devin Review

Comment thread internal/cmd/webhook/create.go
@mscoutermarsh
mscoutermarsh merged commit 1db8676 into main Sep 4, 2026
5 checks passed
@mscoutermarsh
mscoutermarsh deleted the heyglassy/webhook-authorization-token branch September 4, 2026 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants