How to receive webhooks from public repositories events on Github

Nicolas del Valle
2 min readSep 16, 2022

--

Github webhooks allow external services to be notified when certain events happen. When the specified events happen, Github sends a POST request to each of the URLs you provide.

Unfortunately, this service is available only to repository owners.

Fortunately, Github exposes Atom feeds of public repositories releases, commits, tags and more:

// Repo releases
https://github.com/:owner/:repo/releases.atom

// Repo commits
https://github.com/:owner/:repo/commits.atom

// Repo tags
https://github.com/:user/:repo/tags.atom

// User activity
https://github.com/:user.atom

These feeds can be used to create a webhook based on new entries. In this example, we are going to subscribe to a public repository commits and get a webhook with every commit.

To accomplish this, we are going to use therssproject, this service allows us to subscribe to the Github atom feed and get webhooks from every new commit.

therssproject
therssproject

First create an account on therssproject here, then:

  • Create a new endpoint that will receive webhooks events from each commit. Go to Endpoints > Register endpoint and add your API endpoint.
  • Create a new subscription to the Github Atom feed. Go to Create Subscriptions > Create subscription and add the feed URL like: https://github.com/pi-hole/pi-hole/commits.atom (Check other options at the beginning of the post if you don't want to subscribe to commits).

You can see the webhook payload schema on the documentation page and the logs on the therssproject website.

If you want a no code solution, or you want to transform these events to emails, telegram messages or whatever. Use pipedream, create an endpoint on therssproject that points to an HTTP Request trigger on pipedream then create multiple pipedream steps to accomplish what you are looking for.

--

--