Open smg247 opened 1 week ago
/kind feature
This would be very useful, but quite tricky for external plugins - IIRC hook
just passes the received webhook call to the external plugin via http and does not block, so I dont think we have a centralized place that could receive all "not handled, sorry" responses.
We may need to spin up another thread that waits for a "yes, I handled this" or "ignoring" response from each external plugin. Definitely have some details to work out.
Could we use something like smee.io? Konflux is using it: https://konflux-ci.dev/docs/advanced-how-tos/installing/enabling-builds/ https://github.com/konflux-ci/konflux-ci/blob/main/pkg/konftool/gh_app/web.go#L36
@Prucek, that is interesting, but how would smee
help us discern when none of the plugins have handled the request?
I thought, before forwarding the call to hook
, it could do a check, what plugins are available, but I guess it's not that easy
Prow has many plugins, with the option of adding yet more external plugins to the installation. Often times, users interacting with prow will mis-type a plugin command, and the respective plugin won't pick it up and it will look like their command is just being ignored. To combat this, we have added some common misspellings and mistakes to regex in specific external plugins in order to generate an error. It would be even better if there were some mechanism that commented whenever a user began a command with
/
, and the command wasn't picked up by any plugin or external plugin. It would simply have to look for that, and comment back to the user that their command is invalid with a link to the plugin-help page.Implementation notes: This might be complicated, and may require the addition of a boolean return value on the
*Handler
functions in order to signify that the command was handled by that handler.