Skip to content
This repository was archived by the owner on Jan 21, 2026. It is now read-only.

Bytespeicher/bytebot-gitreceiver

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flask webhook for Github

CAUTION: We have moved all of our git presence to ` codeberg <https://codeberg.org/technikkultur-erfurt>`_. This repo is an archive.

If you want to maintain this code, feel free to either fork this repository or migrate it to the group on `codeberg <https://codeberg.org/technikkultur-erfurt`_.

---

A very simple github post-receive web hook handler that executes per default a pull uppon receiving. The executed action is configurable per repository.

It will also verify that the POST request originated from github.com.

Gettings started

Edit repos.json to configure repositories, each repository must be registered under the form GITHUB_USER/REPOSITORY_NAME.

{
    "razius/puppet": {
        "path": "/home/puppet",
        "action": [["git", "pull", "origin", "master"], ],
    },
    "d3non/somerandomexample/branch:live": {
        "path": "/home/exampleapp",
        "action": [["git", "pull", "origin", "live"],
            ["echo", "execute", "some", "commands", "..."] ]
    }
}

Install dependencies.

pip install -r requirements.txt

Start the server.

python index.py 80

Start the server behind a proxy (see: http://flask.pocoo.org/docs/deploying/wsgi-standalone/#proxy-setups)

USE_PROXYFIX=true python index.py 8080

Go to your repository's settings on github.com and register your public URL under Service Hooks -> WebHook URLs.

About

A very simple github post-receive web hook handler

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%