feat(event-handlers): introduce event handler system for GitProxy lifecycle events#1519
feat(event-handlers): introduce event handler system for GitProxy lifecycle events#1519Andreybest wants to merge 1 commit into
Conversation
✅ Deploy Preview for endearing-brigadeiros-63f9d0 canceled.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1519 +/- ##
==========================================
+ Coverage 90.21% 90.46% +0.24%
==========================================
Files 69 75 +6
Lines 5511 5798 +287
Branches 944 1005 +61
==========================================
+ Hits 4972 5245 +273
- Misses 521 534 +13
- Partials 18 19 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@Andreybest Could I vote for an additional phase? We have several custom actions that run when a push is first received and the proxy blocks it for review. This state is not really We also have custom actions that would work really well as plugin events. For example, we:
It would be great if plugins could also add data that can be rendered in the UI. This would be a hugely helpful change, as it would allow us to separate our custom code from the base git-proxy. Keeping the two in sync is painful at the moment. |
|
Hey @andypols ! Thanks for the suggestion, this seems like a good use cases for events. Will try to add mechanisms that would be able to support your use cases :) |
Implements #1449.
Introduces a lightweight, async, observer-only event system so external integrations (notifications, audit feeds) can react to push/pull lifecycle events without coupling to chain internals.
Event hooks can be added the same way as the
pluginsinconfig.proxy.jsonSupports 2 operations:
pullandpushWith 4 phases:
startedcompletederrorpermissionDeniedThis is not well documented, and not sure where to add info on that, would appreciate suggestions on that matter :)