Search code examples
githubpush-notificationbackendpushbullet

Sending a notification Via Push API or Push-bullet when a new GitHub release is published for a repo?


One problem with our app was that it was published on Github, so the users have to actively check for a new update. Then it shook me, what if we send a notification (automatically) when releasing a new version of the app? But it was a lot complicated than what I expected. I would like to do this via our apps website.


Solution

  • You need to setup a webhook associated to a release event.

    The URL of that webhook must reference a server you control, and on which you have installed dgryski/ghpbhook

    This is a endpoint for github and bitbucket post-receive webhook notifications.
    It uses PushBullet to send a summary of the commits to your Android device.

    You need to adapt that project in order to decode a release payload (instead of a commit payload).
    But it gives you an idea of:

    • how to listen for the webhook JSON payload
    • how to send a notification through PushBullet