-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add support for reporting patch install events #71
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #71 +/- ##
==========================================
+ Coverage 97.24% 97.33% +0.08%
==========================================
Files 9 9
Lines 1598 1725 +127
==========================================
+ Hits 1554 1679 +125
- Misses 44 46 +2
☔ View full report in Codecov by Sentry. |
Co-authored-by: Felix Angelov <felix@shorebird.dev>
let patch_install_success_fn = config.network_hooks.patch_install_success_fn; | ||
let url = &patches_events_url(&config.base_url); | ||
patch_install_success_fn(url, request) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let patch_install_success_fn = config.network_hooks.patch_install_success_fn; | |
let url = &patches_events_url(&config.base_url); | |
patch_install_success_fn(url, request) | |
let url = &patches_events_url(&config.base_url); | |
config.network_hooks.patch_install_success_fn(url, request) |
nit but would this work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would need to be (config.network_hooks.patch_install_success_fn)(url, request)
, but yeah, that would work. I did it this way for consistency with the other functions in that file that use network hooks.
Description
Adds the PatchInstallEvent type and posts to the
api/v1/patches/events
endpoint when the engine reports a successful launch and we mark a patch as good.Type of Change