-
Notifications
You must be signed in to change notification settings - Fork 43
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
refactor: Move webhook event parsing logic to webhook handler #841
Conversation
I replied on slack earlier but because not everyone can be up-to-date on slack conversations - I think this is a terrific refactor. We need to figure out a way to call the new eval handler on a slice of entities though to support init and reconcile handlers. |
ca9c0ac
to
7dc079f
Compare
0f035ec
to
7d07042
Compare
In case anyone is following the PRs - we did a screen-share review with Ozz and I think this is a great refactor that should go in. Once the tests are added, I think this will be ready for merge and I'll rebase my pending PR with the policy init support for artifacts atop this one to keep the code clean. |
7d07042
to
e265567
Compare
This moves the event parsing logic to the webhook handler since that's already github specific. Instead of doing any JSON mangling on the executor side, it will expect already built events that are ready to be processed. This makes the executor lighter and allows us to add more complex logic on the webhook side (e.g. handling pull requests)
e265567
to
075813a
Compare
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.
I also tested the patches by porting artifact init atop them and while there are small issues, I'm going to open a separate PR with the fixes (already done locally, rebased on this PR)
This moves the event parsing logic to the webhook handler since that's
already github specific. Instead of doing any JSON mangling on the executor
side, it will expect already built events that are ready to be processed.
This makes the executor lighter and allows us to add more
complex logic on the webhook side (e.g. handling pull requests)