Github Notifier
Project description
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://acme.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://acme.com/updated will be called with HTTP verb 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"
}
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.
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://acme.com/updated
Submitting bugs and feature requests
Bugs and feature request are tracked on GitHub
License
Github Release Notifier is licensed under the MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for github_release_notifier-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3482817092e3b768b72310f3566765d3fcbe8b9bb408c01f71ac79f4ed04ab63 |
|
MD5 | cddf9ec9587b889f9dcaa6292cbff7f8 |
|
BLAKE2b-256 | 43637e1dda2781fe71ce37df62b91cae59e4d590653b7ede54a9193571f4b780 |