Github: Webhooks

Karthiksharma
2 min readMay 15, 2022

--

what exactly is a webhook?

A webhook (also called a web callback or HTTP push API) is a way for an app to provide other applications with real-time information. A webhook delivers data to other applications as it happens, meaning you get data immediately. Unlike typical APIs where you would need to poll for data very frequently in order to get it real-time. This makes webhooks much more efficient for both provider and consumer. The only drawback to webhooks is the difficulty of initially setting them up.

Lets Understand:

if you want to do following things. while you push the code on github automatically. then webhook can help you.

  1. suppose you want to send email to 100 people when you push.
  2. want to notify other people.
  3. upload you commit details to your personal database.
  4. trigger any pipeline.

and there are many other use cases also, in which you can use webhook.

Steps:

  1. In your code write one POST API and in that function write the code that you want to run automatically when you push code on Github.
  2. deploy that url on web.
  3. go to settings > webhooks
  4. in the webhooks provide that POST API URL.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Karthiksharma
Karthiksharma

Written by Karthiksharma

I’m a Mobile Developer enthusiast & a junior pursuing my Bachelors in Computer Science . I am passionate about Data Structure, Web Dev, Machine Learning.

No responses yet