diff --git a/.gitignore b/.gitignore index 5d56b6e..9d9b57e 100644 --- a/.gitignore +++ b/.gitignore @@ -59,3 +59,4 @@ docs/_build/ target/ venv +settings.py diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/gogsmaker.py b/gogsmaker.py index 0de002c..e8e7f4a 100644 --- a/gogsmaker.py +++ b/gogsmaker.py @@ -3,6 +3,7 @@ A webhook-handler for Gogs running `make` when needed. """ from flask import Flask, request +from .settings import HOOKS app = Flask(__name__) diff --git a/settings.default.py b/settings.default.py new file mode 100644 index 0000000..e726f26 --- /dev/null +++ b/settings.default.py @@ -0,0 +1,16 @@ +''' GogsMaker settings ''' + +# List of the repositories to work on +HOOKS = [ + { + # Name of the repository. This is purely local, and determines the name + # of the directory in which the compilation will happen. + 'name': 'foo', + + # URL of the repository, as reported by Gogs in its payload. + 'url': 'https://git.tobast.fr/tobast/flask-gogs-maker', + + # Make targets to be invoked + 'targets': ['all'], + }, +]