Skip to content

Webhook push event - interrupt - validation - carry on push #24410

Discussion options

You must be logged in to vote

On github.com, there isn’t support for the scenario you’re describing. On premise installations of GitHub Enterprise can use pre-receive hooks for this kind of thing, I believe.

Yes, webhooks serve as notifications of events that have already occurred. There is no webhook analog of “event will happen if you return true or will be canceled if you return false”.

The standard way to do the kind of thing you’re describing is:

  1. A push occurs
  2. Webhook notifies a service
  3. Service checks the head commit
  4. Service reports a status on the head commit

That status record can be used in other logic for things like, “Don’t allow merges of PRs with failed required status checks”.

One reason why the current…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants