Skip to main content

Get notified when a specific package got a new release on Github

Project description

https://github.com/femtopixel/github-release-notifier/raw/master/logo.png

Github Release Notifier

latest release latest release Docker pull Docker stars Bitcoin donation Litecoin donation PayPal donation Buy me a coffee

This program will allow you to be notified of Github new releases

Installation

pip3 install github-release-notifier

Usage

usage: github-release-notifier [-h] [--action {cron,subscribe,unsubscribe}] [--package PACKAGE]
              [--webhook WEBHOOK] [--uuid UUID]

optional arguments:
  -h, --help            show this help message and exit
  --action {cron,subscribe,unsubscribe}, -a {cron,subscribe,unsubscribe}
                        Action to do (default: cron)
  --package PACKAGE, -p PACKAGE
                        Github package name / url (required for
                        subscribe/unsubscribe) - prints uuid on subscription
  --webhook WEBHOOK, -w WEBHOOK
                        URL to your webhook (required for
                        subscribe/unsubscribe)
  --uuid UUID, -u UUID  UUID of your webhook (required for unsubscribe)

Example

First, I register my webhook :

github-release-notifier --action subscribe --webhook https://example.com/updated --package jaymoulin/google-music-manager

an UUID is printed. this UUID will be required to unsubscribe the webhook.

When jaymoulin/google-music-manager releases a new version, https://example.com/updated will be called with HTTP method POST and body, a JSON like this :

{
    "date": [2017, 11, 13, 19, 46, 35, 0, 317, 0],
    "version": "0.7.2",
    "title": "Fixes split modules",
    "content": "",
    "media": "https://avatars0.githubusercontent.com/u/14236493?s=60&v=4",
    "author": "jaymoulin"
    "package_name": "jaymoulin/google-music-manager"
}

For this to happen, the system should check if a new version have been released. We can do that by calling github-release-notifier without any parameter or setting –action to cron (which is default).

To automate this process, we could add this process in a cronjob:

(crontab -l ; echo "0 0 * * * github-release-notifier") | sort - | uniq - | crontab -

This will check every day at midnight if new versions have been released.

Configuration

Environment variables can be defined to change default hooks or versions database files (plain json file)

GRN_VERSIONS_FILE: Path to saved versions (default: ${HOME}/.github_release_notifier/versions)
GRN_HOOKS_FILE: Path to hooks configuration (default: ${HOME}/.github_release_notifier/hooks)

Docker Usage

First run the daemon

docker run --name GRN -d femtopixel/github-release-notifier

you can mount a volume to /root/.github_release_notifier/ to keep tracks of webhooks and versions

example:

docker run --name GRN -d -v /path/to/your/saves:/root/.github_release_notifier/ femtopixel/github-release-notifier

Then register your webhook :

docker exec GRN -a subscribe -p jaymoulin/google-music-manager -w https://example.com/updated

Submitting bugs and feature requests

Bugs and feature request are tracked on GitHub

Author

Jay MOULIN jaymoulin+github-release-notifier@gmail.com See also the list of contributors which participated in this program.

License

Github Release Notifier is licensed under the MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

github_release_notifier-0.4.5.tar.gz (6.0 kB view details)

Uploaded Source

File details

Details for the file github_release_notifier-0.4.5.tar.gz.

File metadata

  • Download URL: github_release_notifier-0.4.5.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for github_release_notifier-0.4.5.tar.gz
Algorithm Hash digest
SHA256 bac6b39141ddb77ed0cc82be31ca5122655d627987460031d5f74f1bed2418ce
MD5 50776b1807f8c7cdc9fd3d75354cb9b6
BLAKE2b-256 b9c905421789ccfe492af1b2702cdb34b23a7a5b33c5383a4998a502e0bacf12

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page