Home > Back-end >  Github hook : Is it possible to listen to branch specific push?
Github hook : Is it possible to listen to branch specific push?

Time:01-04

I am setting up auto-deployment for a git repo. I am using the github hooks to listen to the "push" event. But, this event is getting triggered for every branch.

Now, my repo has 20 branches and I am concerned only with the push to "xyz" branch. Is there a way to avoid extra triggers ?

I am aware that I can listen the event and then filter out based on the branch, but I am looking for a more optimized way.

Thanks in advance !

CodePudding user response:

GitHub does not provide any filtering for webhooks. When you subscribe to a particular webhook, all the messages of that type are sent, and if you'd like to filter them, you'll need to do it on your end.

  •  Tags:  
  • Related