Reject Pullrequest Hook

Hi there,

I’m trying to automatically check if the description of a pullrequest fullfills some criteria. So I tried to _create_pull_request_hook.
The hook gets triggered but the pull requests gets created regardless of the HookResponse.
Is the response even checked?
The next idea was to use the _review_pull_request_hook, but again the review is accepted even if the hookresponse is invalid.
The only case I found rejecting is to throw an error.

I’m currently running RhodeCode 4.26.0 Enterprise Edition


indeed those types of hooks now are just fire-and-forget type. So they are mostly designed to trigger and action, but not validate the output.

This makes sense to adjust them in similar way as push hooks, so HookResponse can actually validate the logic.

We’ll work towards adding that to next release 4.29

1 Like