Skip to main content

Simple continuous integration for Django developers, taking the form of a Django app for managing GitHub (or BitBucket) post receive hooks.

https://img.shields.io/travis/sheppard/django-github-hook.svg https://img.shields.io/pypi/v/django-github-hook.svg

Tested on Python 2.7, 3.4 and 3.5, with Django 1.8 and 1.9.

Usage

  • pip install django-github-hook

  • Add github_hook to INSTALLED_APPS in your settings.py

  • ./manage.py migrate (or ./manage.py syncdb)

  • Add e.g. url(r'^hook/', include('github_hook.urls')) to your urls.py urlpatterns

  • Log into the Django admin console

  • Configure your hook with the folowing fields:

    • Name: Hook identifier

    • User: Repo username

    • Repo: Repo name

    • Path: Absolute path to script to execute

  • Go to your repo’s “Service Hooks” settings on GitHub (or BitBucket) and add a WebHook/POST URL:

    • http[s]://[yourwebsite]/hook

    • The repo information will be read from the JSON payload

  • Alternatively, you can specify a specific hook by name:

    • http[s]://[yourwebsite]/hook/name

Examples

The following snippet show how to connect the webhook to a method using django’s signal mechanism. Note that path must be set to “send-signal” in the hook object instead of an absolute path to a script.

from github_hook.models import hook_signal

def processWebhook(sender, **kwargs):
        for key, value in kwargs.iteritems():
                print key, value

hook_signal.connect(processWebhook)

Metadata

Release files for django-github-hook 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-github-hook 0.2.1
File Size Uploaded Provenance
django-github-hook-0.2.1.tar.gz 3.7 kB Without provenance Details

Release files / django-github-hook-0.2.1.tar.gz

Download URL django-github-hook-0.2.1.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
12c7641d2b75c6e51741ec7f6aa9b8b46800c551a96e8904c165b582d35b0d51
BLAKE2b-256 checksum
How to use checksums
3c83d4ab53e3cee736ae7e537047115ab5c15443236a201bffa0a0bc61e43582
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for django-github-hook 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page