Skip to content

feat(notifications): add GET/HEAD support to generic webhooks#125

Open
Shlok-Zanwar wants to merge 1 commit into
Skyfay:mainfrom
Shlok-Zanwar:fix/webhook-get-head-body
Open

feat(notifications): add GET/HEAD support to generic webhooks#125
Shlok-Zanwar wants to merge 1 commit into
Skyfay:mainfrom
Shlok-Zanwar:fix/webhook-get-head-body

Conversation

@Shlok-Zanwar

Copy link
Copy Markdown

Resolves #123

This PR implements support for GET and HEAD methods in the Generic Webhook notification adapter.

Changes:

  • Added GET and HEAD to the GenericWebhookSchema enum.
  • Modified GenericWebhookAdapter to explicitly omit the JSON request body when sending GET or HEAD requests, preventing fetch() from throwing a TypeError.
  • Updated SystemNotificationService and job completion pipelines to check for the explicit boolean return value from adapter.send(), fixing a bug where webhook transmission failures (e.g. DNS errors or timeouts) were falsely logged as successes.
  • Added corresponding unit tests to verify behavior.

Resolves Skyfay#123

- Adds GET and HEAD to GenericWebhookSchema enum
- Omits request body on GET and HEAD requests in GenericWebhookAdapter
- Verifies boolean return value from adapter.send() across SystemNotificationService and job completion pipeline to properly record delivery failures
- Adds explicit GET and HEAD unit tests
@Skyfay

Skyfay commented Jul 13, 2026

Copy link
Copy Markdown
Owner

@Shlok-Zanwar Thanks!

I'll take a look at the code tomorrow, and then it will be included in the next release. Thank you very much.

@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 75.00000% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/lib/runner/steps/04-completion.ts 33.33% 1 Missing and 1 partial ⚠️
...vices/notifications/system-notification-service.ts 33.33% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

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.

[Enhancement]: Add GET/HEAD method support to Generic Webhooks & fix false-positive success logging in Notification Service

2 participants