Skip to main content

Django app for syncing Heroku and Github releases.

Project description

Django Heroku Github Sync

Django app for syncing Heroku and Github releases.

Version support

This app support Django 3.2+ and Python 3.10+.

Background

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.

How it works

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.

Configuration

Django

  1. Add to INSTALLED_APPS
  2. ...

Heroku

You must create a new webhook subscription point at this app (wherever you have it deployed).

Github

You don't need to do anything to configure Github, but you do need to give access to the API.

Tests

Running tests

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

CI

There is a .github/workflows/tox.yml file that can be used as a baseline to run all of the tests on Github.

Heroku

Deploy

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

django_release_tracker-0.2.0.tar.gz (14.3 kB view details)

Uploaded Source

Built Distribution

django_release_tracker-0.2.0-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

Details for the file django_release_tracker-0.2.0.tar.gz.

File metadata

  • Download URL: django_release_tracker-0.2.0.tar.gz
  • Upload date:
  • Size: 14.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.10.10 Darwin/23.1.0

File hashes

Hashes for django_release_tracker-0.2.0.tar.gz
Algorithm Hash digest
SHA256 2f046a71796a11067df64df4eed126d18f0e48123321ff23d213171852d764e7
MD5 92a53e3e8cbfdfdd1629d95026038b5e
BLAKE2b-256 c13db6130f6b14528cf76d9faef84ec694a1cf97b016ec416eb2d5aea01726ea

See more details on using hashes here.

File details

Details for the file django_release_tracker-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_release_tracker-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a5d53dce0a5d2e9053effc8c8e48cb00c9aa28b214fddb7c3c1e9c0cf1f65fb8
MD5 34c2aa339c3350b260abb1d2753cdc5a
BLAKE2b-256 b514987d7a5e2369fdb54a9b98e7839267a341c3e4edfc993752e4785ad353c9

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