Skip to content

feat(webhooks): add webhook mechanism on detection creation#367

Merged
frgfm merged 8 commits intomainfrom
frgfm/webhooks
Sep 22, 2024
Merged

feat(webhooks): add webhook mechanism on detection creation#367
frgfm merged 8 commits intomainfrom
frgfm/webhooks

Conversation

@frgfm
Copy link
Copy Markdown
Member

@frgfm frgfm commented Sep 10, 2024

This PR adds a small webhook table, and used when detection are created as background tasks. I made webhooks editable only by admins, and they post the detection payload for now. We'll be able to edit what gets sent upon dispatch later if needed

Here is the new UML:
UML diagram

@codecov
Copy link
Copy Markdown

codecov bot commented Sep 10, 2024

Codecov Report

Attention: Patch coverage is 82.85714% with 12 lines in your changes missing coverage. Please review.

Project coverage is 86.19%. Comparing base (92b9e28) to head (bd58f3d).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/app/api/dependencies.py 53.33% 7 Missing ⚠️
src/app/api/api_v1/endpoints/detections.py 44.44% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #367      +/-   ##
==========================================
- Coverage   86.58%   86.19%   -0.39%     
==========================================
  Files          31       34       +3     
  Lines         857      920      +63     
==========================================
+ Hits          742      793      +51     
- Misses        115      127      +12     
Flag Coverage Δ
backend 85.79% <82.85%> (-0.39%) ⬇️
client 91.80% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@frgfm frgfm added this to the 0.2.0 milestone Sep 22, 2024
@frgfm frgfm merged commit 5ed718e into main Sep 22, 2024
@frgfm frgfm deleted the frgfm/webhooks branch September 22, 2024 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant