cgitize 8.0.5__tar.gz → 8.0.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cgitize-8.0.5 → cgitize-8.0.6}/.github/workflows/ci.yml +15 -4
- {cgitize-8.0.5 → cgitize-8.0.6}/PKG-INFO +2 -2
- {cgitize-8.0.5 → cgitize-8.0.6}/cgitize/cgit.py +1 -1
- {cgitize-8.0.5 → cgitize-8.0.6}/cgitize/repo.py +32 -29
- {cgitize-8.0.5 → cgitize-8.0.6}/cgitize/utils.py +0 -10
- {cgitize-8.0.5 → cgitize-8.0.6}/cgitize.egg-info/PKG-INFO +2 -2
- {cgitize-8.0.5 → cgitize-8.0.6}/cgitize.egg-info/scm_version.json +2 -2
- {cgitize-8.0.5 → cgitize-8.0.6}/pyproject.toml +2 -1
- {cgitize-8.0.5 → cgitize-8.0.6}/.dockerignore +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/.git-blame-ignore-revs +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/.gitattributes +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/.github/dependabot.yml +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/.github/workflows/maintenance.yml +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/.gitignore +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/.python-version +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/DEVELOPMENT.md +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/LICENSE.txt +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/Makefile +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/README.md +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/cgitize/__init__.py +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/cgitize/bitbucket.py +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/cgitize/config.py +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/cgitize/git.py +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/cgitize/github.py +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/cgitize/gitlab.py +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/cgitize/header.py +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/cgitize/main.py +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/cgitize/url.py +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/cgitize/version.py +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/cgitize.egg-info/SOURCES.txt +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/cgitize.egg-info/dependency_links.txt +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/cgitize.egg-info/entry_points.txt +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/cgitize.egg-info/requires.txt +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/cgitize.egg-info/scm_file_list.json +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/cgitize.egg-info/top_level.txt +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/docker/Dockerfile +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/docker/README.md +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/docker/cgitize.sh +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/docker/frontend/Dockerfile +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/docker/frontend/cmd.sh +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/docker/frontend/etc/cgit/common +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/docker/frontend/etc/cgitrc +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/docker/frontend/etc/nginx/conf.d/default.conf +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/docker/frontend/usr/lib/cgit/filters/about-formatting.sh +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/docker/frontend/usr/lib/cgit/filters/html-converters/.gitattributes +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/docker/frontend/usr/lib/cgit/filters/html-converters/md2html +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/docker/get_output_dir.py +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/docker/in_cron.sh +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/docker-compose.yml +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/docs/api.md +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/docs/auth.md +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/examples/cgitize.toml +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/examples/docker/cgitize.toml +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/prelude.mk +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/requirements.txt +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/setup.cfg +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/test/__init__.py +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/test/integration/docker/.dockerignore +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/test/integration/docker/cgitize/.gitignore +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/test/integration/docker/cgitize/etc/cgitize.toml +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/test/integration/docker/docker-compose.yml +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/test/integration/docker/git_server/Dockerfile +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/test/integration/docker/git_server/setup_repo.sh +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/test/integration/docker/test.sh +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/test/integration/example/test.sh +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/test/integration/local/test.sh +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/test/set_credentials.sh +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/test/unit/__init__.py +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/test/unit/test_bitbucket.py +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/test/unit/test_github.py +0 -0
- {cgitize-8.0.5 → cgitize-8.0.6}/test/unit/test_gitlab.py +0 -0
|
@@ -25,7 +25,11 @@ jobs:
|
|
|
25
25
|
runs-on: ubuntu-latest
|
|
26
26
|
strategy:
|
|
27
27
|
matrix:
|
|
28
|
-
python-version:
|
|
28
|
+
python-version:
|
|
29
|
+
- '3.11'
|
|
30
|
+
- '3.12'
|
|
31
|
+
- '3.13'
|
|
32
|
+
- '3.14'
|
|
29
33
|
name: 'Test / ${{ matrix.python-version }}'
|
|
30
34
|
env:
|
|
31
35
|
CGITIZE_GITHUB_USERNAME: '${{ secrets.CGITIZE_GITHUB_USERNAME }}'
|
|
@@ -61,7 +65,9 @@ jobs:
|
|
|
61
65
|
run: sudo make test/docker
|
|
62
66
|
|
|
63
67
|
test_example_config:
|
|
64
|
-
needs:
|
|
68
|
+
needs:
|
|
69
|
+
- test_local
|
|
70
|
+
- test_docker
|
|
65
71
|
runs-on: ubuntu-latest
|
|
66
72
|
name: 'Test / example config'
|
|
67
73
|
env:
|
|
@@ -88,7 +94,11 @@ jobs:
|
|
|
88
94
|
run: make test/example
|
|
89
95
|
|
|
90
96
|
publish_docker:
|
|
91
|
-
needs:
|
|
97
|
+
needs:
|
|
98
|
+
- lint
|
|
99
|
+
- test_local
|
|
100
|
+
- test_example_config
|
|
101
|
+
- test_docker
|
|
92
102
|
runs-on: ubuntu-latest
|
|
93
103
|
strategy:
|
|
94
104
|
matrix:
|
|
@@ -149,7 +159,8 @@ jobs:
|
|
|
149
159
|
tags: '${{ steps.meta.outputs.tags }}'
|
|
150
160
|
|
|
151
161
|
publish_pypi:
|
|
152
|
-
needs:
|
|
162
|
+
needs:
|
|
163
|
+
- publish_docker
|
|
153
164
|
runs-on: ubuntu-latest
|
|
154
165
|
name: 'Publish / PyPI'
|
|
155
166
|
steps:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cgitize
|
|
3
|
-
Version: 8.0.
|
|
3
|
+
Version: 8.0.6
|
|
4
4
|
Summary: Self-host your repositories using cgit
|
|
5
5
|
Author-email: Egor Tensin <egor@tensin.name>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -9,7 +9,7 @@ Project-URL: Bug Tracker, https://github.com/egor-tensin/cgitize/issues
|
|
|
9
9
|
Classifier: Development Status :: 5 - Production/Stable
|
|
10
10
|
Classifier: Programming Language :: Python :: 3
|
|
11
11
|
Classifier: Topic :: Software Development :: Version Control :: Git
|
|
12
|
-
Requires-Python: >=3.
|
|
12
|
+
Requires-Python: >=3.11
|
|
13
13
|
Description-Content-Type: text/markdown
|
|
14
14
|
License-File: LICENSE.txt
|
|
15
15
|
Requires-Dist: atlassian-python-api~=4.0
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
# For details, see https://github.com/egor-tensin/cgitize
|
|
4
4
|
# Distributed under the MIT License.
|
|
5
5
|
|
|
6
|
+
from contextlib import chdir
|
|
6
7
|
import logging
|
|
7
8
|
import os
|
|
8
9
|
import shutil
|
|
9
10
|
|
|
10
11
|
from cgitize.git import Git
|
|
11
|
-
from cgitize.utils import chdir
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
class CGitServer:
|
|
@@ -3,19 +3,16 @@
|
|
|
3
3
|
# For details, see https://github.com/egor-tensin/cgitize
|
|
4
4
|
# Distributed under the MIT License.
|
|
5
5
|
|
|
6
|
-
from enum import
|
|
6
|
+
from enum import auto, StrEnum
|
|
7
7
|
import os.path
|
|
8
8
|
|
|
9
9
|
from cgitize import url
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
class Visibility(
|
|
13
|
-
ALL =
|
|
14
|
-
PUBLIC =
|
|
15
|
-
PRIVATE =
|
|
16
|
-
|
|
17
|
-
def __str__(self):
|
|
18
|
-
return self.name
|
|
12
|
+
class Visibility(StrEnum):
|
|
13
|
+
ALL = auto()
|
|
14
|
+
PUBLIC = auto()
|
|
15
|
+
PRIVATE = auto()
|
|
19
16
|
|
|
20
17
|
@staticmethod
|
|
21
18
|
def from_config(public, private):
|
|
@@ -32,33 +29,39 @@ class Visibility(Enum):
|
|
|
32
29
|
def to_bitbucket_arg(self):
|
|
33
30
|
# https://developer.atlassian.com/cloud/bitbucket/rest/intro/#filtering
|
|
34
31
|
# https://developer.atlassian.com/cloud/bitbucket/rest/api-group-repositories/#api-group-repositories
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
32
|
+
match self:
|
|
33
|
+
case Visibility.ALL:
|
|
34
|
+
return None
|
|
35
|
+
case Visibility.PUBLIC:
|
|
36
|
+
return "is_private=False"
|
|
37
|
+
case Visibility.PRIVATE:
|
|
38
|
+
return "is_private=True"
|
|
39
|
+
case _:
|
|
40
|
+
raise NotImplementedError(f"not implemented visibility level: {self}")
|
|
42
41
|
|
|
43
42
|
def to_github_arg(self):
|
|
44
43
|
# https://docs.github.com/en/rest/repos/repos?apiVersion=2026-03-10#list-repositories-for-the-authenticated-user
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
44
|
+
match self:
|
|
45
|
+
case Visibility.ALL:
|
|
46
|
+
return None
|
|
47
|
+
case Visibility.PUBLIC:
|
|
48
|
+
return "public"
|
|
49
|
+
case Visibility.PRIVATE:
|
|
50
|
+
return "private"
|
|
51
|
+
case _:
|
|
52
|
+
raise NotImplementedError(f"not implemented visibility level: {self}")
|
|
52
53
|
|
|
53
54
|
def to_gitlab_arg(self):
|
|
54
55
|
# https://python-gitlab.readthedocs.io/en/stable/gl_objects/projects.html#projects
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
56
|
+
match self:
|
|
57
|
+
case Visibility.ALL:
|
|
58
|
+
return None
|
|
59
|
+
case Visibility.PUBLIC:
|
|
60
|
+
return "public"
|
|
61
|
+
case Visibility.PRIVATE:
|
|
62
|
+
return "private"
|
|
63
|
+
case _:
|
|
64
|
+
raise NotImplementedError(f"not implemented visibility level: {self}")
|
|
62
65
|
|
|
63
66
|
|
|
64
67
|
class Repo:
|
|
@@ -77,16 +77,6 @@ def try_capture(*args, **kwargs):
|
|
|
77
77
|
return e.returncode == 0, e.output
|
|
78
78
|
|
|
79
79
|
|
|
80
|
-
@contextmanager
|
|
81
|
-
def chdir(new_cwd):
|
|
82
|
-
old_cwd = os.getcwd()
|
|
83
|
-
os.chdir(new_cwd)
|
|
84
|
-
try:
|
|
85
|
-
yield
|
|
86
|
-
finally:
|
|
87
|
-
os.chdir(old_cwd)
|
|
88
|
-
|
|
89
|
-
|
|
90
80
|
@contextmanager
|
|
91
81
|
def protected_file(path):
|
|
92
82
|
# 0600:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cgitize
|
|
3
|
-
Version: 8.0.
|
|
3
|
+
Version: 8.0.6
|
|
4
4
|
Summary: Self-host your repositories using cgit
|
|
5
5
|
Author-email: Egor Tensin <egor@tensin.name>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -9,7 +9,7 @@ Project-URL: Bug Tracker, https://github.com/egor-tensin/cgitize/issues
|
|
|
9
9
|
Classifier: Development Status :: 5 - Production/Stable
|
|
10
10
|
Classifier: Programming Language :: Python :: 3
|
|
11
11
|
Classifier: Topic :: Software Development :: Version Control :: Git
|
|
12
|
-
Requires-Python: >=3.
|
|
12
|
+
Requires-Python: >=3.11
|
|
13
13
|
Description-Content-Type: text/markdown
|
|
14
14
|
License-File: LICENSE.txt
|
|
15
15
|
Requires-Dist: atlassian-python-api~=4.0
|
|
@@ -12,7 +12,8 @@ license-files = ["LICENSE.txt"]
|
|
|
12
12
|
dynamic = ["version"]
|
|
13
13
|
authors = [{name = "Egor Tensin", email = "egor@tensin.name"}]
|
|
14
14
|
readme = "README.md"
|
|
15
|
-
requires-python = ">=3.
|
|
15
|
+
requires-python = ">=3.11"
|
|
16
|
+
# ^^^ For enum.StrEnum/contextlib.chdir, at least?
|
|
16
17
|
|
|
17
18
|
dependencies = [
|
|
18
19
|
"atlassian-python-api ~= 4.0",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cgitize-8.0.5 → cgitize-8.0.6}/docker/frontend/usr/lib/cgit/filters/html-converters/.gitattributes
RENAMED
|
File without changes
|
{cgitize-8.0.5 → cgitize-8.0.6}/docker/frontend/usr/lib/cgit/filters/html-converters/md2html
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|