-
Notifications
You must be signed in to change notification settings - Fork 26
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
[Feature request] Run Function After Comparison Request #241
Comments
Hi @wokayme, and thanks for the feature request! This would definitely make sense. My main concern is that we've made async comparisons the default, which means the comparison result will not be available unless you set A similar idea that's been floating around is to add a way to get a callback on a URL when a result is available. This is similar to GitHub's webhooks. Would that solve your usecase you think? |
In our case, we have HAPPO_IS_ASYNC set for false so it's not a problem for us. But I think creating a webhook is quite a good idea:
The only problem is that it requires extending API https://happo.io/docs/api. |
Yeah, it's slightly more involved. I'm happy adding a callback in the meantime. How about we call it |
I added changes ;) happy to hear feedback and potential comments to units. |
@trotzig is any timeline for webhooks for job comparison 🤔 We are currently using |
Yeah it will be hard to get happo-e2e to honor the new
Let me know if you have other ideas! |
I would like to be able to pass to happo config function which will be triggered after sending a synchronous request to the Happo repository.
Usecase
handle statistics about flaky/failing tests for internal needs.
Currently how I can do it
Currently, the thing I am getting back is a simple summary where I need on my own look for data and parse it. IMO it's quite dangerous as I don't know how API is going to change and this simple text can be changed.
Proposed solution
Add the opportunity to pass a function in
.happo.js
config file which will be run after comparison and get as an argumenthttps://happo.io/docs/api#Comparison
response object.Example PR for better illustration.
I will be happy with the writing implementation, but before I would like to hear feedback:
#242
The text was updated successfully, but these errors were encountered: