cgitize 5.0.0__tar.gz → 5.0.2__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-5.0.0 → cgitize-5.0.2}/.github/workflows/ci.yml +1 -1
- {cgitize-5.0.0 → cgitize-5.0.2}/DEVELOPMENT.md +2 -0
- {cgitize-5.0.0/cgitize.egg-info → cgitize-5.0.2}/PKG-INFO +7 -2
- {cgitize-5.0.0 → cgitize-5.0.2}/README.md +1 -1
- {cgitize-5.0.0 → cgitize-5.0.2/cgitize.egg-info}/PKG-INFO +7 -2
- {cgitize-5.0.0 → cgitize-5.0.2}/cgitize.egg-info/SOURCES.txt +2 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/docker/Dockerfile +1 -1
- {cgitize-5.0.0 → cgitize-5.0.2}/docker/README.md +29 -5
- {cgitize-5.0.0 → cgitize-5.0.2}/docker/frontend/Dockerfile +2 -2
- {cgitize-5.0.0 → cgitize-5.0.2}/docker-compose.yml +3 -9
- cgitize-5.0.2/docs/api.md +57 -0
- cgitize-5.0.2/examples/docker/cgitize.toml +7 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/prelude.mk +1 -1
- {cgitize-5.0.0 → cgitize-5.0.2}/requirements.txt +7 -7
- {cgitize-5.0.0 → cgitize-5.0.2}/test/integration/docker/git_server/Dockerfile +1 -1
- {cgitize-5.0.0 → cgitize-5.0.2}/.dockerignore +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/.gitattributes +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/.gitignore +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/.pylintrc +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/.python-version +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/LICENSE.txt +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/Makefile +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/cgitize/__init__.py +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/cgitize/bitbucket.py +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/cgitize/cgit.py +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/cgitize/config.py +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/cgitize/git.py +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/cgitize/github.py +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/cgitize/gitlab.py +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/cgitize/main.py +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/cgitize/repo.py +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/cgitize/utils.py +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/cgitize/version.py +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/cgitize.egg-info/dependency_links.txt +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/cgitize.egg-info/entry_points.txt +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/cgitize.egg-info/requires.txt +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/cgitize.egg-info/top_level.txt +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/docker/cgitize.sh +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/docker/frontend/cmd.sh +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/docker/frontend/etc/cgit/common +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/docker/frontend/etc/cgitrc +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/docker/frontend/etc/nginx/conf.d/default.conf +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/docker/frontend/usr/lib/cgit/filters/about-formatting.sh +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/docker/frontend/usr/lib/cgit/filters/html-converters/.gitattributes +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/docker/frontend/usr/lib/cgit/filters/html-converters/md2html +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/docker/get_output_dir.py +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/docker/in_cron.sh +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/docs/auth.md +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/examples/cgitize.toml +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/pyproject.toml +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/setup.cfg +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/test/__init__.py +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/test/integration/docker/.dockerignore +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/test/integration/docker/cgitize/.gitignore +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/test/integration/docker/cgitize/etc/cgitize.toml +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/test/integration/docker/docker-compose.yml +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/test/integration/docker/git_server/setup_repo.sh +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/test/integration/docker/test.sh +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/test/integration/example/test.sh +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/test/integration/local/test.sh +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/test/unit/__init__.py +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/test/unit/test_bitbucket.py +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/test/unit/test_github.py +0 -0
- {cgitize-5.0.0 → cgitize-5.0.2}/test/unit/test_gitlab.py +0 -0
|
@@ -12,7 +12,7 @@ jobs:
|
|
|
12
12
|
runs-on: ubuntu-latest
|
|
13
13
|
strategy:
|
|
14
14
|
matrix:
|
|
15
|
-
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
|
|
15
|
+
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
|
|
16
16
|
name: 'Test / ${{ matrix.python-version }}'
|
|
17
17
|
env:
|
|
18
18
|
CGITIZE_GITHUB_USERNAME: cgitize-test
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: cgitize
|
|
3
|
-
Version: 5.0.
|
|
3
|
+
Version: 5.0.2
|
|
4
4
|
Summary: Self-host your repositories using cgit
|
|
5
5
|
Author-email: Egor Tensin <Egor.Tensin@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -13,6 +13,11 @@ Classifier: Topic :: Software Development :: Version Control :: Git
|
|
|
13
13
|
Requires-Python: >=3.6
|
|
14
14
|
Description-Content-Type: text/markdown
|
|
15
15
|
License-File: LICENSE.txt
|
|
16
|
+
Requires-Dist: atlassian-python-api~=3.28.0
|
|
17
|
+
Requires-Dist: importlib-metadata~=4.0; python_version < "3.8"
|
|
18
|
+
Requires-Dist: PyGithub~=1.0
|
|
19
|
+
Requires-Dist: python-gitlab~=2.0
|
|
20
|
+
Requires-Dist: tomli~=1.0
|
|
16
21
|
|
|
17
22
|
cgitize
|
|
18
23
|
=======
|
|
@@ -27,7 +32,7 @@ Supports cloning all of your repositories from major hosting providers:
|
|
|
27
32
|
* Bitbucket,
|
|
28
33
|
* GitLab.
|
|
29
34
|
|
|
30
|
-
Example output can be found at https://git.
|
|
35
|
+
Example output can be found at https://git.tensin.name/.
|
|
31
36
|
|
|
32
37
|
Installation
|
|
33
38
|
------------
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: cgitize
|
|
3
|
-
Version: 5.0.
|
|
3
|
+
Version: 5.0.2
|
|
4
4
|
Summary: Self-host your repositories using cgit
|
|
5
5
|
Author-email: Egor Tensin <Egor.Tensin@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -13,6 +13,11 @@ Classifier: Topic :: Software Development :: Version Control :: Git
|
|
|
13
13
|
Requires-Python: >=3.6
|
|
14
14
|
Description-Content-Type: text/markdown
|
|
15
15
|
License-File: LICENSE.txt
|
|
16
|
+
Requires-Dist: atlassian-python-api~=3.28.0
|
|
17
|
+
Requires-Dist: importlib-metadata~=4.0; python_version < "3.8"
|
|
18
|
+
Requires-Dist: PyGithub~=1.0
|
|
19
|
+
Requires-Dist: python-gitlab~=2.0
|
|
20
|
+
Requires-Dist: tomli~=1.0
|
|
16
21
|
|
|
17
22
|
cgitize
|
|
18
23
|
=======
|
|
@@ -27,7 +32,7 @@ Supports cloning all of your repositories from major hosting providers:
|
|
|
27
32
|
* Bitbucket,
|
|
28
33
|
* GitLab.
|
|
29
34
|
|
|
30
|
-
Example output can be found at https://git.
|
|
35
|
+
Example output can be found at https://git.tensin.name/.
|
|
31
36
|
|
|
32
37
|
Installation
|
|
33
38
|
------------
|
|
@@ -42,8 +42,10 @@ docker/frontend/etc/nginx/conf.d/default.conf
|
|
|
42
42
|
docker/frontend/usr/lib/cgit/filters/about-formatting.sh
|
|
43
43
|
docker/frontend/usr/lib/cgit/filters/html-converters/.gitattributes
|
|
44
44
|
docker/frontend/usr/lib/cgit/filters/html-converters/md2html
|
|
45
|
+
docs/api.md
|
|
45
46
|
docs/auth.md
|
|
46
47
|
examples/cgitize.toml
|
|
48
|
+
examples/docker/cgitize.toml
|
|
47
49
|
test/__init__.py
|
|
48
50
|
test/integration/docker/.dockerignore
|
|
49
51
|
test/integration/docker/docker-compose.yml
|
|
@@ -39,11 +39,35 @@ It could look like this:
|
|
|
39
39
|
Compose
|
|
40
40
|
-------
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
Here's an example docker-compose.yml file:
|
|
43
|
+
|
|
44
|
+
version: '3'
|
|
45
|
+
|
|
46
|
+
services:
|
|
47
|
+
cgitize:
|
|
48
|
+
environment:
|
|
49
|
+
# Every 3 hours:
|
|
50
|
+
SCHEDULE: '0 */3 * * *'
|
|
51
|
+
# Set CGITIZE_{GITHUB,BITBUCKET,GITLAB}_{USERNAME,TOKEN} variables
|
|
52
|
+
# here or in the config file.
|
|
53
|
+
image: egortensin/cgitize:5
|
|
54
|
+
restart: unless-stopped
|
|
55
|
+
volumes:
|
|
56
|
+
- ./example.toml:/etc/cgitize/cgitize.toml:ro
|
|
57
|
+
- /srv/volumes/cgitize:/mnt/cgitize
|
|
58
|
+
frontend:
|
|
59
|
+
image: egortensin/cgitize-frontend:5
|
|
60
|
+
ports:
|
|
61
|
+
- '127.0.0.1:80:80'
|
|
62
|
+
restart: unless-stopped
|
|
63
|
+
volumes:
|
|
64
|
+
- /srv/volumes/cgitize:/mnt/cgitize:ro
|
|
65
|
+
|
|
66
|
+
In this configuration, cgitize pulls repositories defined in example.toml every
|
|
67
|
+
3 hours and puts them to /srv/volumes/cgitize on the host.
|
|
68
|
+
|
|
69
|
+
To launch containers, run:
|
|
45
70
|
|
|
46
|
-
docker-compose build
|
|
47
71
|
docker-compose up -d
|
|
48
72
|
|
|
49
|
-
|
|
73
|
+
To inspect the repositories, visit http://localhost:80/.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
FROM nginx:1.
|
|
1
|
+
FROM nginx:1.25-alpine AS base
|
|
2
2
|
|
|
3
3
|
FROM base AS builder
|
|
4
4
|
|
|
5
5
|
# Install cmark-gfm:
|
|
6
|
-
ARG CMARK_GFM_VERSION=0.29.0.gfm.
|
|
6
|
+
ARG CMARK_GFM_VERSION=0.29.0.gfm.13
|
|
7
7
|
ADD ["https://github.com/github/cmark-gfm/archive/refs/tags/$CMARK_GFM_VERSION.zip", "/"]
|
|
8
8
|
|
|
9
9
|
RUN apk add -q --no-cache cmake g++ make python3 && \
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
version: '3
|
|
2
|
-
|
|
3
|
-
x-default-settings:
|
|
4
|
-
&default-settings
|
|
5
|
-
logging:
|
|
6
|
-
driver: journald
|
|
7
|
-
restart: unless-stopped
|
|
1
|
+
version: '3'
|
|
8
2
|
|
|
9
3
|
services:
|
|
10
4
|
cgitize:
|
|
11
|
-
<< : *default-settings
|
|
12
5
|
build:
|
|
13
6
|
context: .
|
|
14
7
|
dockerfile: docker/Dockerfile
|
|
@@ -16,16 +9,17 @@ services:
|
|
|
16
9
|
# Every 3 hours:
|
|
17
10
|
SCHEDULE: '0 */3 * * *'
|
|
18
11
|
image: egortensin/cgitize:latest
|
|
12
|
+
restart: unless-stopped
|
|
19
13
|
volumes:
|
|
20
14
|
- ./examples/docker:/etc/cgitize:ro
|
|
21
15
|
- repositories:/mnt/cgitize
|
|
22
16
|
frontend:
|
|
23
|
-
<< : *default-settings
|
|
24
17
|
build:
|
|
25
18
|
context: ./docker/frontend
|
|
26
19
|
image: egortensin/cgitize-frontend:latest
|
|
27
20
|
ports:
|
|
28
21
|
- '127.0.0.1:80:80'
|
|
22
|
+
restart: unless-stopped
|
|
29
23
|
volumes:
|
|
30
24
|
- repositories:/mnt/cgitize:ro
|
|
31
25
|
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
This project supports GitHub, Bitbucket & GitLab. All of them are,
|
|
2
|
+
unfortunately, peculiar in their own way.
|
|
3
|
+
|
|
4
|
+
Tokens
|
|
5
|
+
------
|
|
6
|
+
|
|
7
|
+
All of the forges support access tokens, of course (although they're called
|
|
8
|
+
"app passwords" on Bitbucket). They can be used to do `git clone https://`
|
|
9
|
+
with authentication info in the URL. For GitHub, it's enough to just specify
|
|
10
|
+
the token:
|
|
11
|
+
|
|
12
|
+
git clone https://TOKEN@github.com/USER/REPO.git
|
|
13
|
+
|
|
14
|
+
For Bitbucket & GitLab, however, you need to specify both the user and the
|
|
15
|
+
token in the URL:
|
|
16
|
+
|
|
17
|
+
git clone https://USER:TOKEN@bitbucket.org/USER/REPO.git
|
|
18
|
+
|
|
19
|
+
Terminology
|
|
20
|
+
-----------
|
|
21
|
+
|
|
22
|
+
* GitHub has users and organizations; both of which can have repositories.
|
|
23
|
+
* A user can be a collaborator on a different user's repository, while an
|
|
24
|
+
organization (I think) can only fully own its repositories.
|
|
25
|
+
* Bitbucket has user accounts, workspaces & projects. User accounts own (or
|
|
26
|
+
are invited to) workspaces, which include projects.
|
|
27
|
+
* Not so long ago, when workspaces were introduced, all users got a default
|
|
28
|
+
workspace matching their username (with an untitled project).
|
|
29
|
+
* Each repository belongs to a project, which belongs to a workspace.
|
|
30
|
+
There can be multiple users collaborating on a workspace, which includes one or
|
|
31
|
+
more projects, which include repositories. What an amazing concept! I
|
|
32
|
+
couldn't be happier to deal with this.
|
|
33
|
+
* GitLab sorta has users and organizations (called "groups") here. I'm pretty
|
|
34
|
+
sure they're called "namespaces" really, and are the same as Bitbucket's
|
|
35
|
+
"workspaces", but whatever.
|
|
36
|
+
|
|
37
|
+
API
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
* If you authenticate with GitHub and call `/users/USER/repos` for the
|
|
41
|
+
authenticated user, you will [only get public repositories]. Why? Who knows.
|
|
42
|
+
* You need to call `/user/repos` to include private repositories.
|
|
43
|
+
* You _might_ want to use the `affiliation` parameter to only get owned
|
|
44
|
+
repositories. Otherwise, you'll get all repositories in all orgs you're a
|
|
45
|
+
member of, etc.
|
|
46
|
+
* For Bitbucket, `/repositories/WORKSPACE` does [include private repositories]
|
|
47
|
+
(if you're authenticated, of course).
|
|
48
|
+
* When somebody else invites you to collaborate on a repository, you get
|
|
49
|
+
access to a different workspace; this repository is not added to your workspace
|
|
50
|
+
or anything.
|
|
51
|
+
* GitLab will, helpfully, only return projects [owned by the user] when
|
|
52
|
+
`/users/USER/projects` is called.
|
|
53
|
+
|
|
54
|
+
[only get public repositories]: https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28#list-repositories-for-a-user
|
|
55
|
+
[call /user/repos]: https://docs.github.com/en/rest/repos/repos?apiVersion=2022-11-28#list-repositories-for-the-authenticated-user
|
|
56
|
+
[include private repositories]: https://developer.atlassian.com/cloud/bitbucket/rest/api-group-repositories/#api-repositories-workspace-get
|
|
57
|
+
[owned by the user]: https://docs.gitlab.com/ee/api/projects.html#list-user-projects
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
atlassian-python-api==3.28.1
|
|
2
|
-
certifi==2023.
|
|
3
|
-
cffi==1.
|
|
4
|
-
charset-normalizer==3.2
|
|
5
|
-
cryptography==41.0.
|
|
2
|
+
certifi==2023.11.17
|
|
3
|
+
cffi==1.16.0
|
|
4
|
+
charset-normalizer==3.3.2
|
|
5
|
+
cryptography==41.0.7
|
|
6
6
|
Deprecated==1.2.14
|
|
7
|
-
idna==3.
|
|
7
|
+
idna==3.6
|
|
8
8
|
oauthlib==3.2.2
|
|
9
9
|
pycparser==2.21
|
|
10
10
|
PyGithub==1.59.1
|
|
@@ -16,5 +16,5 @@ requests-oauthlib==1.3.1
|
|
|
16
16
|
requests-toolbelt==1.0.0
|
|
17
17
|
six==1.16.0
|
|
18
18
|
tomli==1.2.3
|
|
19
|
-
urllib3==2.0
|
|
20
|
-
wrapt==1.
|
|
19
|
+
urllib3==2.1.0
|
|
20
|
+
wrapt==1.16.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
|
{cgitize-5.0.0 → cgitize-5.0.2}/docker/frontend/usr/lib/cgit/filters/html-converters/.gitattributes
RENAMED
|
File without changes
|
{cgitize-5.0.0 → cgitize-5.0.2}/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
|