├── tests ├── __init__.py └── test_git_uri_parser.py ├── gitlab_tools ├── bin │ └── __init__.py ├── enums │ ├── __init__.py │ ├── ProtocolEnum.py │ ├── VcsEnum.py │ └── InvokedByEnum.py ├── forms │ ├── __init__.py │ ├── custom_fields.py │ ├── fingerprint.py │ ├── sign.py │ ├── push_mirror.py │ └── pull_mirror.py ├── models │ ├── __init__.py │ ├── gitlab_tools.py │ └── celery.py ├── tasks │ └── __init__.py ├── tools │ ├── __init__.py │ ├── Svn.py │ ├── Validators.py │ ├── GitRemote.py │ ├── celery.py │ ├── gitlab.py │ ├── fingerprint.py │ ├── formaters.py │ ├── crypto.py │ ├── jsonifier.py │ ├── GitUri.py │ ├── Git.py │ ├── GitSubprocess.py │ └── helpers.py ├── views │ ├── __init__.py │ ├── api │ │ ├── __init__.py │ │ └── index.py │ ├── home │ │ ├── __init__.py │ │ ├── templates │ │ │ └── home.index.home.html │ │ └── index.py │ ├── sign │ │ ├── __init__.py │ │ ├── templates │ │ │ └── sign.index.login.html │ │ └── index.py │ ├── fingerprint │ │ ├── __init__.py │ │ └── templates │ │ │ ├── fingerprint.index.fingerprint.html │ │ │ └── fingerprint.index.new.html │ ├── pull_mirror │ │ ├── __init__.py │ │ └── templates │ │ │ ├── url_info.html │ │ │ ├── pull_mirror.index.pull_mirror.html │ │ │ └── pull_mirror.index.log.html │ └── push_mirror │ │ ├── __init__.py │ │ └── templates │ │ ├── url_info.html │ │ ├── push_mirror.index.push_mirror.html │ │ ├── push_mirror.index.log.html │ │ ├── push_mirror.index.new.html │ │ └── push_mirror.index.edit.html ├── celery_beat │ └── __init__.py ├── migrations │ ├── __init__.py │ ├── versions │ │ ├── __init__.py │ │ ├── README.md │ │ ├── 0bf6832fd1f2_.py │ │ ├── 946211522c2f_.py │ │ ├── 3b2efd6da478_.py │ │ ├── cad4d8aacceb_.py │ │ ├── 29579044e36c_.py │ │ ├── 56189bfb2c5f_.py │ │ ├── 6f456354bea1_.py │ │ ├── 82696705e6df_.py │ │ ├── 20bcb4b2673c_.py │ │ ├── d4841aeeb072_.py │ │ ├── 6ea24c49b7a1_.py │ │ ├── 56c59adcfe10_.py │ │ └── 19e8725e0581_.py │ ├── README │ ├── script.py.mako │ ├── alembic.ini │ └── env.py ├── __init__.py ├── static │ ├── img │ │ ├── favicon.png │ │ └── no_group_avatar.png │ ├── package.json │ ├── style.css │ └── package-lock.json ├── wsgi.py ├── templates │ ├── 403.html │ ├── 404.html │ ├── 400.html │ ├── 500.html │ ├── _formhelpers.html │ ├── macros.html │ └── base.html ├── __main__.py ├── extensions.py ├── blueprints.py ├── config.py ├── middleware.py └── application.py ├── asu.sh ├── code-check.sh ├── translation_compile.sh ├── translation_generate.sh ├── debian ├── py3dist-overrides └── python3-gitlab-tools.postinst ├── doc ├── img │ ├── home.png │ ├── home_thumb.png │ ├── fingerprints.png │ ├── pull_mirrors.png │ ├── fingerprints_thumb.png │ └── pull_mirrors_thumb.png └── PostgreSQL.md ├── pre-commit.sh ├── translation_update.sh ├── babel.cfg ├── stdeb.cfg ├── etc ├── gitlab-tools │ └── config.yml └── systemd │ └── system │ ├── gitlab-tools.service │ ├── gitlab-tools_celeryworker.service │ └── gitlab-tools_celerybeat.service ├── manage.py ├── MANIFEST.in ├── setup.cfg ├── .version.yml ├── CHANGELOG.md ├── archlinux ├── PKGBUILD └── gitlab-tools.install ├── .gitignore ├── tox.ini ├── .gitlab-ci.yml ├── setup.py └── README.md /tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /gitlab_tools/bin/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /gitlab_tools/enums/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /gitlab_tools/forms/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /gitlab_tools/models/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /gitlab_tools/tasks/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /gitlab_tools/tools/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /gitlab_tools/views/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /gitlab_tools/celery_beat/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /gitlab_tools/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /gitlab_tools/views/api/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /gitlab_tools/views/home/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /gitlab_tools/views/sign/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /gitlab_tools/views/fingerprint/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /gitlab_tools/views/pull_mirror/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /gitlab_tools/views/push_mirror/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /gitlab_tools/migrations/versions/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /gitlab_tools/__init__.py: -------------------------------------------------------------------------------- 1 | __version__ = '1.5.3' 2 | -------------------------------------------------------------------------------- /asu.sh: -------------------------------------------------------------------------------- 1 | sudo -u gitlab-tools -H python3 manage.py $1 2 | -------------------------------------------------------------------------------- /gitlab_tools/migrations/README: -------------------------------------------------------------------------------- 1 | Generic single-database configuration. -------------------------------------------------------------------------------- /code-check.sh: -------------------------------------------------------------------------------- 1 | flake8 gitlab-tools tests --max-line-length=160 --builtins=_ -------------------------------------------------------------------------------- /translation_compile.sh: -------------------------------------------------------------------------------- 1 | pybabel compile -d gitlab-tools/translations 2 | -------------------------------------------------------------------------------- /translation_generate.sh: -------------------------------------------------------------------------------- 1 | pybabel extract -F babel.cfg -o messages.pot . 2 | -------------------------------------------------------------------------------- /debian/py3dist-overrides: -------------------------------------------------------------------------------- 1 | psycopg2-binary python3-psycopg2 2 | raven python3-raven 3 | -------------------------------------------------------------------------------- /doc/img/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Salamek/gitlab-tools/HEAD/doc/img/home.png -------------------------------------------------------------------------------- /gitlab_tools/migrations/versions/README.md: -------------------------------------------------------------------------------- 1 | # Directory where all migrations are stored -------------------------------------------------------------------------------- /pre-commit.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | ./code-check.sh 4 | python3 setup.py test 5 | -------------------------------------------------------------------------------- /translation_update.sh: -------------------------------------------------------------------------------- 1 | pybabel update -i messages.pot -d gitlab-tools/translations 2 | -------------------------------------------------------------------------------- /doc/img/home_thumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Salamek/gitlab-tools/HEAD/doc/img/home_thumb.png -------------------------------------------------------------------------------- /doc/img/fingerprints.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Salamek/gitlab-tools/HEAD/doc/img/fingerprints.png -------------------------------------------------------------------------------- /doc/img/pull_mirrors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Salamek/gitlab-tools/HEAD/doc/img/pull_mirrors.png -------------------------------------------------------------------------------- /babel.cfg: -------------------------------------------------------------------------------- 1 | [python: **.py] 2 | [jinja2: **/templates/**.html] 3 | extensions=jinja2.ext.autoescape,jinja2.ext.with_ 4 | -------------------------------------------------------------------------------- /doc/img/fingerprints_thumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Salamek/gitlab-tools/HEAD/doc/img/fingerprints_thumb.png -------------------------------------------------------------------------------- /doc/img/pull_mirrors_thumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Salamek/gitlab-tools/HEAD/doc/img/pull_mirrors_thumb.png -------------------------------------------------------------------------------- /gitlab_tools/enums/ProtocolEnum.py: -------------------------------------------------------------------------------- 1 | 2 | class ProtocolEnum: 3 | SSH = 1 4 | HTTP = 2 5 | HTTPS = 3 6 | -------------------------------------------------------------------------------- /gitlab_tools/enums/VcsEnum.py: -------------------------------------------------------------------------------- 1 | 2 | class VcsEnum: 3 | GIT = 1 4 | BAZAAR = 2 5 | SVN = 3 6 | MERCURIAL = 4 7 | -------------------------------------------------------------------------------- /gitlab_tools/static/img/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Salamek/gitlab-tools/HEAD/gitlab_tools/static/img/favicon.png -------------------------------------------------------------------------------- /stdeb.cfg: -------------------------------------------------------------------------------- 1 | [DEFAULT] 2 | Package3: gitlab-tools 3 | Depends3: redis-server, git, rabbitmq-server 4 | Replaces3: python3-gitlab-tools -------------------------------------------------------------------------------- /gitlab_tools/enums/InvokedByEnum.py: -------------------------------------------------------------------------------- 1 | 2 | class InvokedByEnum: 3 | UNKNOWN = 1 4 | SCHEDULER = 2 5 | HOOK = 3 6 | MANUAL = 4 7 | -------------------------------------------------------------------------------- /gitlab_tools/static/img/no_group_avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Salamek/gitlab-tools/HEAD/gitlab_tools/static/img/no_group_avatar.png -------------------------------------------------------------------------------- /etc/gitlab-tools/config.yml: -------------------------------------------------------------------------------- 1 | PORT: 80 2 | HOST: 0.0.0.0 3 | SECRET_KEY: # Change to something secure 4 | SQLALCHEMY_DATABASE_URI: # Change to your server configuration -------------------------------------------------------------------------------- /manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # -*- coding: utf-8 -*- 3 | 4 | from gitlab_tools.bin.gitlab_tools import main 5 | 6 | if __name__ == '__main__': 7 | main() 8 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include requirements.txt 2 | include README.md 3 | recursive-include etc * 4 | recursive-include tests * 5 | recursive-include debian * 6 | recursive-inclide gitlab_tools/static * 7 | -------------------------------------------------------------------------------- /gitlab_tools/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | Bootstrap for use in uwsgi and so 3 | """ 4 | 5 | from gitlab_tools.application import create_app, get_config 6 | 7 | config = get_config('gitlab_tools.config.Production') 8 | app = create_app(config) 9 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [aliases] 2 | test=pytest 3 | 4 | [mypy] 5 | python_version = 3.4 6 | strict = true 7 | show_error_codes = true 8 | follow_imports = silent 9 | ignore_missing_imports = true 10 | allow_any_generics = true 11 | warn_return_any = false 12 | warn_unreachable = true 13 | exclude = venv/* 14 | -------------------------------------------------------------------------------- /gitlab_tools/static/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "description": "Gitlab Tools npm", 3 | "license": "GPL-3.0", 4 | "repository": "https://github.com/Salamek/gitlab-tools", 5 | "dependencies": { 6 | "bootstrap": "^4.6.2", 7 | "jquery": "~3.5.1", 8 | "font-awesome": "^4.7.0", 9 | "select2": "^4.0.13" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /gitlab_tools/templates/403.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block append_title %} - HTTP 403{% endblock %} 4 | 5 | {% block body %} 6 |
Access denied.
9 |URL: {{ request.url }}
10 |Page not found.
9 |URL: {{ request.url }}
10 |Page found but the POST/GET data sent was invalid.
9 |URL: {{ request.url }}
10 |Uh-oh you found a bug! An email has been sent to the ADMINs list.
9 |URL: {{ request.url }}
10 |[nothing] - Git SSH SCP like syntax (git@github.com:Salamek/gitlab-tools.git)https:// - Git over SSL (https://github.com/Salamek/gitlab-tools.git)http:// - Git over HTTP (http://github.com/Salamek/gitlab-tools.git)git:// - Git native (git://github.com/Salamek/gitlab-tools.git)ssh:// - Git over SSH (ssh://git@github.com/Salamek/gitlab-tools.git)svn+http:// - SVN over HTTPsvn+https:// - SVN over SSLsvn+ssh:// - SVN over SSHbzr::bzr:// - Bazaarhg::https:// - Mercurial[nothing] - Git SSH SCP like syntax (git@github.com:Salamek/gitlab-tools.git)https:// - Git over SSL (https://github.com/Salamek/gitlab-tools.git)http:// - Git over HTTP (http://github.com/Salamek/gitlab-tools.git)git:// - Git native (git://github.com/Salamek/gitlab-tools.git)ssh:// - Git over SSH (ssh://git@github.com/Salamek/gitlab-tools.git)svn+http:// - SVN over HTTPsvn+https:// - SVN over SSLsvn+ssh:// - SVN over SSHbzr::bzr:// - Bazaarhg::https:// - Mercurial{{private_key.get_name()}} {{private_key.get_base64()}}
11 | {{fingerprint_md5}}
13 | {{fingerprint_sha256}}
15 |
16 | Pull mirrors allows you to pull code from other repositories to your gitlab installation.
27 | 28 |Push mirrors allows you to push your code from gitlab to other VCS services.
32 | 33 |Fingerprints keeps your code/traffic safe.
37 | 38 || # | 13 |{{ _('VCS') }} | 14 |{{ _('Project name') }} | 15 |{{ _('Mirror') }} | 16 |{{ _('Webhook') }} | 17 |{{ _('Last sync') }} | 18 |{{ _('Created') }} | 19 |20 | |
|---|---|---|---|---|---|---|---|
| {{item.id}} | 27 |{{item.foreign_vcs_type|format_vcs}} | 28 |{{item.project.name_with_namespace}} | 29 |{{item.project_mirror}} | 30 |31 | | {{item.last_sync|format_datetime}} | 32 |{{item.created|format_datetime}} | 33 |34 | {% if item.target %} 35 | {{ _('Trigger sync') }} 36 | {% endif %} 37 | 38 | 39 | 40 | | 41 |
| # | 13 |{{ _('VCS') }} | 14 |{{ _('Project name') }} | 15 |{{ _('Mirror') }} | 16 |{{ _('Webhook') }} | 17 |{{ _('Periodic sync') }} | 18 |{{ _('Last sync') }} | 19 |{{ _('Created') }} | 20 |21 | |
|---|---|---|---|---|---|---|---|---|
| {{item.id}} | 28 |{{item.foreign_vcs_type|format_vcs}} | 29 |{{item.project_name}} | 30 |{{item.project_mirror}} | 31 |32 | | {{item.periodic_sync|format_cron_syntax}} | 33 |{{item.last_sync|format_datetime}} | 34 |{{item.created|format_datetime}} | 35 |36 | {% if item.project_id %} 37 | {{ _('Trigger sync') }} 38 | {% endif %} 39 | 40 | 41 | 42 | | 43 |
| {{ _('Task ID') }} | 11 |{{ _('Task name') }} | 12 |{{ _('Invoked by') }} | 13 |{{ _('Status') }} | 14 |{{ _('Result') }} | 15 |{{ _('Date done') }} | 16 |{{ _('Traceback') }} | 17 |18 | |
|---|---|---|---|---|---|---|---|
| {{task_result.taskmeta.task_id}} | 24 |{{task_result.task_name}} | 25 |{{task_result.invoked_by}} | 26 |{{task_result.taskmeta.status}} | 27 |{{task_result.taskmeta.result}} | 28 |{{task_result.taskmeta.date_done|format_datetime}} | 29 |30 | 31 | | 32 ||
| {{task_result_children.taskmeta.task_id}} | 36 |{{task_result_children.task_name}} | 37 |{{task_result_children.invoked_by|format_task_invoked_by}} | 38 |{{task_result_children.taskmeta.status}} | 39 |{{task_result_children.taskmeta.result}} | 40 |{{task_result_children.taskmeta.date_done|format_datetime}} | 41 |42 | 43 | | 44 |
| {{ _('Task ID') }} | 11 |{{ _('Task name') }} | 12 |{{ _('Invoked by') }} | 13 |{{ _('Status') }} | 14 |{{ _('Result') }} | 15 |{{ _('Date done') }} | 16 |{{ _('Traceback') }} | 17 |
|---|---|---|---|---|---|---|
| {{task_result.taskmeta.task_id}} | 23 |{{task_result.task_name}} | 24 |{{task_result.invoked_by|format_task_invoked_by}} | 25 |{{task_result.taskmeta.status}} | 26 |{{task_result.taskmeta.result}} | 27 |{{task_result.taskmeta.date_done|format_datetime}} | 28 | 29 |30 | 31 | | 32 |
| {{task_result_children.taskmeta.task_id}} | 36 |{{task_result_children.task_name}} | 37 |{{task_result_children.invoked_by|format_task_invoked_by}} | 38 |{{task_result_children.taskmeta.status}} | 39 |{{task_result_children.taskmeta.result}} | 40 |{{task_result_children.taskmeta.date_done|format_datetime}} | 41 |42 | 43 | | 44 |