Ramith Jayatilleka
Ramith Jayatilleka

Reputation: 2162

Is it possible to add webhooks to a gist?

Basically, the same way as I can set up a push webhook for a Github repo, can I set it up for a Github gist? I looked around, and I suspect not since there's no documentation for it.

If it is impossible, is there anyway to get notifications whenever a gist is updated? If not, I'm ready to implement a solution that polls every few minutes, but I prefer the notification based solution.

Upvotes: 3

Views: 942

Answers (2)

VonC
VonC

Reputation: 1328152

is there anyway to get notifications whenever a gist is updated?

Since May 8th, 2019, it is possible.

See "Gist notifications "

You can now receive notifications for new conversations occurring on gists. Similar to issues and pull requests, you can opt out of these notifications at any time.

The documentation now includes:

Receiving notifications for gist activity

You'll receive a notification when:

  • You are the author of the gist.
  • Someone mentions you in a gist.
  • You comment in another persons's gist.
  • You subscribe to a gist, by clicking Subscribe at the top any gist.

In your case, maybe you can combine that with GitHub Actions, which does allow some code execution on the server side, including some involving notification.

Upvotes: 3

Ramith Jayatilleka
Ramith Jayatilleka

Reputation: 2162

Well, I confirmed it for myself. Github doesn't allow any kind of code to be run on its server's during/before/after a push, so it has webhooks for developers to take advantage of that. Gist does not support either actual Git hooks or Github webhooks.

Upvotes: 4

Related Questions