Skip to content

feat(webhooks): add Webhooks CRUD#105

Open
sgerrand wants to merge 3 commits into
mainfrom
feat/webhooks
Open

feat(webhooks): add Webhooks CRUD#105
sgerrand wants to merge 3 commits into
mainfrom
feat/webhooks

Conversation

@sgerrand
Copy link
Copy Markdown
Owner

@sgerrand sgerrand commented May 4, 2026

💁 Adds CRUD coverage for the Webhooks resource, complementing the existing verify_signature/3 helper merged in #92.

Summary

  • Humaans.Webhooks now exposes both:
    • Standard CRUD over /api/webhooks (subscribe/list/update/delete a URL+events)
    • The pre-existing verify_signature/3 for HMAC-SHA256 payload verification
  • New Humaans.Resources.Webhook struct (id, companyId, url, events, timestamps)
  • README's Available Resources list now includes Webhooks
  • The Humaans.webhooks/0 accessor's docstring now mentions both responsibilities

This branch was rebased onto current main; the merge resolution combined the new CRUD with the existing signature-verification module.

Addresses Group D1 (Webhooks) of the API coverage review.

Test plan

  • mix test — 19 tests in webhooks_test.exs pass (CRUD + verify_signature)
  • mix credo clean
  • mix format --check-formatted clean

Copilot AI review requested due to automatic review settings May 4, 2026 15:31
sgerrand added 3 commits May 4, 2026 16:55
Adds Humaans.Webhooks covering /api/webhooks. Webhooks subscribe a URL
to a list of event types; the struct captures the documented shape
(id, companyId, url, events, timestamps).
The rebase onto origin/main left two def webhooks/0 entries — the one
added by this branch and the existing one from #92's signature-verify
work. Dropping the duplicate and updating the moduledoc to mention both
the CRUD operations and verify_signature/3.
@coveralls
Copy link
Copy Markdown

coveralls commented May 4, 2026

Coverage Report for CI Build 25329141471

Coverage remained the same at 100.0%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: 1 of 1 lines across 1 file are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 213
Covered Lines: 213
Line Coverage: 100.0%
Coverage Strength: 21.6 hits per line

💛 - Coveralls

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