Django app for syncing Heroku and Github releases.
⚠️ DEPRECATION NOTICEThis library is no longer maintained and has been retired. We recommend migrating to alternative solutions for syncing Heroku and GitHub releases. No further updates, bug fixes, or security patches will be provided.
This app support Django 3.2+ and Python 3.10+.
If you deploy your application to Heroku, and you store your code in Github, you can create automated Release notes in GH each time a release is deployed to Heroku.
This uses Github's "automatically generated release notes" feature.
The underlying principle is simple - it uses Github's REST API to create a new repo release (with associated tag) for a specific commit as identified by the Heroku API, using the Heroku release version number as the tag.
The app uses Heroku's App
Webhooks
api:release webhook, which receives updates each time a release is
created, or its status is updated. (The updates are important as a
release goes through various states, and is not released until the state
reaches succeeded). You can read more about the release webhook
payload
here.
- Add to
INSTALLED_APPS - ...
You must create a new webhook subscription point at this app (wherever you have it deployed).
You don't need to do anything to configure Github, but you do need to give access to the API.
The tests themselves use pytest as the test runner. If you have
installed the poetry evironment, you can run them thus:
$ poetry run pytest
or
$ poetry shell
(release_tracker) $ pytest
The full suite is controlled by tox, which contains a set of
environments that will format, lint, and test against all support Python
- Django version combinations.
$ tox
...
______________________ summary __________________________
fmt: commands succeeded
lint: commands succeeded
mypy: commands succeeded
py37-django22: commands succeeded
py37-django32: commands succeeded
py37-djangomain: commands succeeded
py38-django22: commands succeeded
py38-django32: commands succeeded
py38-djangomain: commands succeeded
py39-django22: commands succeeded
py39-django32: commands succeeded
py39-djangomain: commands succeeded
There is a .github/workflows/tox.yml file that can be used as a
baseline to run all of the tests on Github.