cgitize 5.1.4__tar.gz → 6.0.1__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.
Files changed (67) hide show
  1. cgitize-6.0.1/.github/dependabot.yml +6 -0
  2. {cgitize-5.1.4 → cgitize-6.0.1}/.github/workflows/ci.yml +12 -12
  3. {cgitize-5.1.4 → cgitize-6.0.1}/DEVELOPMENT.md +31 -11
  4. {cgitize-5.1.4 → cgitize-6.0.1}/Makefile +19 -0
  5. {cgitize-5.1.4/cgitize.egg-info → cgitize-6.0.1}/PKG-INFO +5 -5
  6. {cgitize-5.1.4 → cgitize-6.0.1}/cgitize/github.py +5 -2
  7. {cgitize-5.1.4 → cgitize-6.0.1}/cgitize/main.py +2 -0
  8. {cgitize-5.1.4 → cgitize-6.0.1}/cgitize/utils.py +1 -1
  9. {cgitize-5.1.4 → cgitize-6.0.1/cgitize.egg-info}/PKG-INFO +5 -5
  10. {cgitize-5.1.4 → cgitize-6.0.1}/cgitize.egg-info/SOURCES.txt +2 -0
  11. {cgitize-5.1.4 → cgitize-6.0.1}/cgitize.egg-info/requires.txt +3 -3
  12. {cgitize-5.1.4 → cgitize-6.0.1}/docker/README.md +3 -5
  13. {cgitize-5.1.4 → cgitize-6.0.1}/docker/frontend/Dockerfile +10 -1
  14. {cgitize-5.1.4 → cgitize-6.0.1}/docker-compose.yml +0 -2
  15. {cgitize-5.1.4 → cgitize-6.0.1}/pyproject.toml +4 -4
  16. cgitize-6.0.1/requirements.txt +23 -0
  17. {cgitize-5.1.4 → cgitize-6.0.1}/test/integration/docker/docker-compose.yml +0 -1
  18. {cgitize-5.1.4 → cgitize-6.0.1}/test/integration/docker/test.sh +5 -11
  19. cgitize-6.0.1/test/set_credentials.sh +13 -0
  20. {cgitize-5.1.4 → cgitize-6.0.1}/test/unit/test_github.py +2 -2
  21. cgitize-5.1.4/requirements.txt +0 -20
  22. {cgitize-5.1.4 → cgitize-6.0.1}/.dockerignore +0 -0
  23. {cgitize-5.1.4 → cgitize-6.0.1}/.gitattributes +0 -0
  24. {cgitize-5.1.4 → cgitize-6.0.1}/.gitignore +0 -0
  25. {cgitize-5.1.4 → cgitize-6.0.1}/.pylintrc +0 -0
  26. {cgitize-5.1.4 → cgitize-6.0.1}/.python-version +0 -0
  27. {cgitize-5.1.4 → cgitize-6.0.1}/LICENSE.txt +0 -0
  28. {cgitize-5.1.4 → cgitize-6.0.1}/README.md +0 -0
  29. {cgitize-5.1.4 → cgitize-6.0.1}/cgitize/__init__.py +0 -0
  30. {cgitize-5.1.4 → cgitize-6.0.1}/cgitize/bitbucket.py +0 -0
  31. {cgitize-5.1.4 → cgitize-6.0.1}/cgitize/cgit.py +0 -0
  32. {cgitize-5.1.4 → cgitize-6.0.1}/cgitize/config.py +0 -0
  33. {cgitize-5.1.4 → cgitize-6.0.1}/cgitize/git.py +0 -0
  34. {cgitize-5.1.4 → cgitize-6.0.1}/cgitize/gitlab.py +0 -0
  35. {cgitize-5.1.4 → cgitize-6.0.1}/cgitize/repo.py +0 -0
  36. {cgitize-5.1.4 → cgitize-6.0.1}/cgitize/version.py +0 -0
  37. {cgitize-5.1.4 → cgitize-6.0.1}/cgitize.egg-info/dependency_links.txt +0 -0
  38. {cgitize-5.1.4 → cgitize-6.0.1}/cgitize.egg-info/entry_points.txt +0 -0
  39. {cgitize-5.1.4 → cgitize-6.0.1}/cgitize.egg-info/top_level.txt +0 -0
  40. {cgitize-5.1.4 → cgitize-6.0.1}/docker/Dockerfile +0 -0
  41. {cgitize-5.1.4 → cgitize-6.0.1}/docker/cgitize.sh +0 -0
  42. {cgitize-5.1.4 → cgitize-6.0.1}/docker/frontend/cmd.sh +0 -0
  43. {cgitize-5.1.4 → cgitize-6.0.1}/docker/frontend/etc/cgit/common +0 -0
  44. {cgitize-5.1.4 → cgitize-6.0.1}/docker/frontend/etc/cgitrc +0 -0
  45. {cgitize-5.1.4 → cgitize-6.0.1}/docker/frontend/etc/nginx/conf.d/default.conf +0 -0
  46. {cgitize-5.1.4 → cgitize-6.0.1}/docker/frontend/usr/lib/cgit/filters/about-formatting.sh +0 -0
  47. {cgitize-5.1.4 → cgitize-6.0.1}/docker/frontend/usr/lib/cgit/filters/html-converters/.gitattributes +0 -0
  48. {cgitize-5.1.4 → cgitize-6.0.1}/docker/frontend/usr/lib/cgit/filters/html-converters/md2html +0 -0
  49. {cgitize-5.1.4 → cgitize-6.0.1}/docker/get_output_dir.py +0 -0
  50. {cgitize-5.1.4 → cgitize-6.0.1}/docker/in_cron.sh +0 -0
  51. {cgitize-5.1.4 → cgitize-6.0.1}/docs/api.md +0 -0
  52. {cgitize-5.1.4 → cgitize-6.0.1}/docs/auth.md +0 -0
  53. {cgitize-5.1.4 → cgitize-6.0.1}/examples/cgitize.toml +0 -0
  54. {cgitize-5.1.4 → cgitize-6.0.1}/examples/docker/cgitize.toml +0 -0
  55. {cgitize-5.1.4 → cgitize-6.0.1}/prelude.mk +0 -0
  56. {cgitize-5.1.4 → cgitize-6.0.1}/setup.cfg +0 -0
  57. {cgitize-5.1.4 → cgitize-6.0.1}/test/__init__.py +0 -0
  58. {cgitize-5.1.4 → cgitize-6.0.1}/test/integration/docker/.dockerignore +0 -0
  59. {cgitize-5.1.4 → cgitize-6.0.1}/test/integration/docker/cgitize/.gitignore +0 -0
  60. {cgitize-5.1.4 → cgitize-6.0.1}/test/integration/docker/cgitize/etc/cgitize.toml +0 -0
  61. {cgitize-5.1.4 → cgitize-6.0.1}/test/integration/docker/git_server/Dockerfile +0 -0
  62. {cgitize-5.1.4 → cgitize-6.0.1}/test/integration/docker/git_server/setup_repo.sh +0 -0
  63. {cgitize-5.1.4 → cgitize-6.0.1}/test/integration/example/test.sh +0 -0
  64. {cgitize-5.1.4 → cgitize-6.0.1}/test/integration/local/test.sh +0 -0
  65. {cgitize-5.1.4 → cgitize-6.0.1}/test/unit/__init__.py +0 -0
  66. {cgitize-5.1.4 → cgitize-6.0.1}/test/unit/test_bitbucket.py +0 -0
  67. {cgitize-5.1.4 → cgitize-6.0.1}/test/unit/test_gitlab.py +0 -0
@@ -0,0 +1,6 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: github-actions
4
+ directory: /
5
+ schedule:
6
+ interval: weekly
@@ -12,7 +12,7 @@ jobs:
12
12
  runs-on: ubuntu-latest
13
13
  strategy:
14
14
  matrix:
15
- python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
15
+ python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
16
16
  name: 'Test / ${{ matrix.python-version }}'
17
17
  env:
18
18
  CGITIZE_GITHUB_USERNAME: cgitize-test
@@ -23,11 +23,11 @@ jobs:
23
23
  CGITIZE_GITLAB_TOKEN: '${{ secrets.CGITIZE_GITLAB_TOKEN}}'
24
24
  steps:
25
25
  - name: Checkout
26
- uses: actions/checkout@v4
26
+ uses: actions/checkout@v6
27
27
  with:
28
28
  fetch-depth: 0
29
29
  - name: Set up Python
30
- uses: actions/setup-python@v5
30
+ uses: actions/setup-python@v6
31
31
  with:
32
32
  python-version: '${{ matrix.python-version }}'
33
33
  cache: pip
@@ -43,7 +43,7 @@ jobs:
43
43
  name: 'Test / Docker'
44
44
  steps:
45
45
  - name: Checkout
46
- uses: actions/checkout@v4
46
+ uses: actions/checkout@v6
47
47
  - name: Integration test (Docker)
48
48
  run: sudo make test/docker
49
49
 
@@ -60,15 +60,15 @@ jobs:
60
60
  CGITIZE_GITLAB_TOKEN: '${{ secrets.CGITIZE_GITLAB_TOKEN}}'
61
61
  steps:
62
62
  - name: Checkout
63
- uses: actions/checkout@v4
63
+ uses: actions/checkout@v6
64
64
  - name: Set up Python
65
- uses: actions/setup-python@v5
65
+ uses: actions/setup-python@v6
66
66
  with:
67
67
  cache: pip
68
68
  - name: Install dependencies
69
69
  run: pip install -q -r requirements.txt
70
70
  - name: Set up ssh-agent
71
- uses: webfactory/ssh-agent@v0.8.0
71
+ uses: webfactory/ssh-agent@v0.9.1
72
72
  with:
73
73
  ssh-private-key: '${{ secrets.SSH_KEY }}'
74
74
  - name: Integration test (example config)
@@ -87,7 +87,7 @@ jobs:
87
87
  if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/'))
88
88
  steps:
89
89
  - name: Checkout
90
- uses: actions/checkout@v4
90
+ uses: actions/checkout@v6
91
91
  # https://github.com/docker/metadata-action#semver
92
92
  - id: meta
93
93
  name: Docker Hub metadata
@@ -120,7 +120,7 @@ jobs:
120
120
  echo 'platforms=amd64,armhf,arm64' >> "$GITHUB_OUTPUT"
121
121
  fi
122
122
  - name: Build and publish
123
- uses: docker/build-push-action@v5
123
+ uses: docker/build-push-action@v6
124
124
  with:
125
125
  context: '${{ matrix.context }}'
126
126
  file: '${{ matrix.file }}'
@@ -135,11 +135,11 @@ jobs:
135
135
  name: 'Publish / PyPI'
136
136
  steps:
137
137
  - name: Checkout
138
- uses: actions/checkout@v4
138
+ uses: actions/checkout@v6
139
139
  with:
140
140
  fetch-depth: 0
141
141
  - name: Set up Python
142
- uses: actions/setup-python@v5
142
+ uses: actions/setup-python@v6
143
143
  - name: Verify package can be installed
144
144
  run: pip install -q .
145
145
  - name: Install package builder
@@ -147,7 +147,7 @@ jobs:
147
147
  - name: Build package
148
148
  run: python -m build
149
149
  - name: Publish as artifact
150
- uses: actions/upload-artifact@v4
150
+ uses: actions/upload-artifact@v6
151
151
  with:
152
152
  name: dist
153
153
  path: dist
@@ -4,12 +4,31 @@ Workspace setup
4
4
  * Create a virtual Python environment: `make venv`
5
5
  * Use the virtual environment: `. .venv/bin/activate`
6
6
  * Deactivate the environment when you're done: `deactivate`
7
- * Make sure basic tests work: `make test`
8
7
 
9
- Development
10
- -----------
8
+ Testing
9
+ -------
10
+
11
+ N.B.: `make test` is a shortcut for unit tests and the `local` integration
12
+ test.
13
+
14
+ ### Unit tests
15
+
16
+ make test/unit
17
+
18
+ You need to set the following environment variables for the authenticated
19
+ access tests to work:
20
+
21
+ * `CGITIZE_BITBUCKET_USERNAME`: `cgitize-test`
22
+ * `CGITIZE_BITBUCKET_TOKEN`
23
+ * `CGITIZE_GITHUB_USERNAME`: `cgitize-test`
24
+ * `CGITIZE_GITHUB_TOKEN`
25
+ * `CGITIZE_GITLAB_USERNAME`: `cgitize-test`
26
+ * `CGITIZE_GITLAB_TOKEN`
27
+
28
+ You can run `. test/set_credentials.sh`; it'll ask you to fill in the secrets.
29
+
30
+ ### Integration
11
31
 
12
- * Run unit tests: `make test/unit`
13
32
  * There're three integration tests: `local`, `docker` and `example`.
14
33
  Run them using
15
34
 
@@ -17,20 +36,21 @@ Run them using
17
36
  sudo make test/docker
18
37
  make test/example
19
38
 
20
- * The `example` test uses the forges' APIs and might easily hit rate
39
+ * The `example` test uses the forges' APIs and might easily hit their rate
21
40
  limits.
22
- Set environment variables described in [examples/cgitize.toml] to use "access
23
- tokens" and get much higher rate limits.
24
- * Run both unit tests and the `local` test using
25
-
26
- make test
41
+ Use the tokens used for unit tests.
42
+ * Additionally, it tests cloning via SSH (the `clone_via_ssh` setting) too,
43
+ so you need to add the secret project-specific SSH key to your agent as well
44
+ (make sure it's the only one in the agent; if there's a key associated with
45
+ another user, it could get used instead).
27
46
 
28
47
  [examples/cgitize.toml]: examples/cgitize.toml
29
48
 
30
49
  Upgrading dependencies
31
50
  ----------------------
32
51
 
33
- * Upgrade virtual environment packages: `make venv/upgrade`
52
+ * Upgrade virtual environment packages: `make venv/upgrade`.
53
+ `make maintenance` does that and pushes a commit to the upstream.
34
54
  * Upgrade base Docker images.
35
55
  * Find the current base images using `git grep -P 'FROM \w+:'`
36
56
  * Upgrade the [cmark-gfm] version used in the [cgitize-frontend Docker image].
@@ -23,6 +23,25 @@ venv/upgrade: venv/reset
23
23
  && pip uninstall -q --yes '$(call escape,$(PROJECT))' \
24
24
  && pip freeze > requirements.txt
25
25
 
26
+ .PHONY: maintenance
27
+ maintenance:
28
+ $(MAKE) venv/upgrade
29
+
30
+ @git_status="$$( git status --porcelain=v1 )" && \
31
+ if [ -z "$$git_status" ]; then \
32
+ true; \
33
+ elif [ "$$git_status" = ' M requirements.txt' ]; then \
34
+ git commit -am 'requirements.txt: bump dependencies' && \
35
+ git push -q; \
36
+ else \
37
+ echo; \
38
+ echo '-----------------------------------------------------------------'; \
39
+ echo 'Error: unrecognized modifications in the repository:'; \
40
+ echo "$$git_status"; \
41
+ echo '-----------------------------------------------------------------'; \
42
+ exit 1; \
43
+ fi
44
+
26
45
  .PHONY: python
27
46
  python:
28
47
  $(venv_activate) && python
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cgitize
3
- Version: 5.1.4
3
+ Version: 6.0.1
4
4
  Summary: Self-host your repositories using cgit
5
5
  Author-email: Egor Tensin <egor@tensin.name>
6
6
  License: MIT
@@ -10,13 +10,13 @@ Classifier: Development Status :: 5 - Production/Stable
10
10
  Classifier: License :: OSI Approved :: MIT License
11
11
  Classifier: Programming Language :: Python :: 3
12
12
  Classifier: Topic :: Software Development :: Version Control :: Git
13
- Requires-Python: >=3.6
13
+ Requires-Python: >=3.9
14
14
  Description-Content-Type: text/markdown
15
15
  License-File: LICENSE.txt
16
- Requires-Dist: atlassian-python-api~=3.28.0
16
+ Requires-Dist: atlassian-python-api~=4.0
17
17
  Requires-Dist: importlib-metadata~=4.0; python_version < "3.8"
18
- Requires-Dist: PyGithub~=1.0
19
- Requires-Dist: python-gitlab~=2.0
18
+ Requires-Dist: PyGithub~=2.0
19
+ Requires-Dist: python-gitlab~=6.0
20
20
  Requires-Dist: tomli~=1.0
21
21
  Dynamic: license-file
22
22
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  import logging
7
7
 
8
- from github import Github, GithubException
8
+ from github import Auth, Github, GithubException
9
9
 
10
10
  from cgitize.repo import Repo
11
11
 
@@ -13,7 +13,10 @@ from cgitize.repo import Repo
13
13
  class GitHub:
14
14
  def __init__(self, username, token):
15
15
  self._username = username
16
- self._impl = Github(token)
16
+ auth = None
17
+ if token is not None:
18
+ auth = Auth.Token(token)
19
+ self._impl = Github(auth=auth)
17
20
 
18
21
  def get_repo(self, repo):
19
22
  try:
@@ -65,6 +65,8 @@ def main(argv=None):
65
65
  logging.info('All repositories were updated successfully')
66
66
  else:
67
67
  logging.warning("Some repositories couldn't be updated!")
68
+ if error is not None:
69
+ logging.warning('Error: %s', error)
68
70
 
69
71
  setup_error_header_file(config.main.error_header_path, success, error)
70
72
  return int(not success)
@@ -17,7 +17,7 @@ def setup_logging(verbose=False):
17
17
  level = logging.DEBUG if verbose else logging.INFO
18
18
  logging.basicConfig(
19
19
  level=level,
20
- datefmt='%Y-%m-%d %H:%M:%S',
20
+ datefmt='%Y-%m-%d %H:%M:%S%z',
21
21
  format='%(asctime)s | %(levelname)s | %(message)s',
22
22
  # Log to stdout, because that's where subprocess's output goes (so that
23
23
  # the don't get interleaved).
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cgitize
3
- Version: 5.1.4
3
+ Version: 6.0.1
4
4
  Summary: Self-host your repositories using cgit
5
5
  Author-email: Egor Tensin <egor@tensin.name>
6
6
  License: MIT
@@ -10,13 +10,13 @@ Classifier: Development Status :: 5 - Production/Stable
10
10
  Classifier: License :: OSI Approved :: MIT License
11
11
  Classifier: Programming Language :: Python :: 3
12
12
  Classifier: Topic :: Software Development :: Version Control :: Git
13
- Requires-Python: >=3.6
13
+ Requires-Python: >=3.9
14
14
  Description-Content-Type: text/markdown
15
15
  License-File: LICENSE.txt
16
- Requires-Dist: atlassian-python-api~=3.28.0
16
+ Requires-Dist: atlassian-python-api~=4.0
17
17
  Requires-Dist: importlib-metadata~=4.0; python_version < "3.8"
18
- Requires-Dist: PyGithub~=1.0
19
- Requires-Dist: python-gitlab~=2.0
18
+ Requires-Dist: PyGithub~=2.0
19
+ Requires-Dist: python-gitlab~=6.0
20
20
  Requires-Dist: tomli~=1.0
21
21
  Dynamic: license-file
22
22
 
@@ -11,6 +11,7 @@ docker-compose.yml
11
11
  prelude.mk
12
12
  pyproject.toml
13
13
  requirements.txt
14
+ .github/dependabot.yml
14
15
  .github/workflows/ci.yml
15
16
  cgitize/__init__.py
16
17
  cgitize/bitbucket.py
@@ -47,6 +48,7 @@ docs/auth.md
47
48
  examples/cgitize.toml
48
49
  examples/docker/cgitize.toml
49
50
  test/__init__.py
51
+ test/set_credentials.sh
50
52
  test/integration/docker/.dockerignore
51
53
  test/integration/docker/docker-compose.yml
52
54
  test/integration/docker/test.sh
@@ -1,6 +1,6 @@
1
- atlassian-python-api~=3.28.0
2
- PyGithub~=1.0
3
- python-gitlab~=2.0
1
+ atlassian-python-api~=4.0
2
+ PyGithub~=2.0
3
+ python-gitlab~=6.0
4
4
  tomli~=1.0
5
5
 
6
6
  [:python_version < "3.8"]
@@ -41,8 +41,6 @@ Compose
41
41
 
42
42
  Here's an example docker-compose.yml file:
43
43
 
44
- version: '3'
45
-
46
44
  services:
47
45
  cgitize:
48
46
  environment:
@@ -50,13 +48,13 @@ Here's an example docker-compose.yml file:
50
48
  SCHEDULE: '0 */3 * * *'
51
49
  # Set CGITIZE_{GITHUB,BITBUCKET,GITLAB}_{USERNAME,TOKEN} variables
52
50
  # here or in the config file.
53
- image: egortensin/cgitize:5
51
+ image: egortensin/cgitize:6
54
52
  restart: unless-stopped
55
53
  volumes:
56
54
  - ./example.toml:/etc/cgitize/cgitize.toml:ro
57
55
  - /srv/volumes/cgitize:/mnt/cgitize
58
56
  frontend:
59
- image: egortensin/cgitize-frontend:5
57
+ image: egortensin/cgitize-frontend:6
60
58
  ports:
61
59
  - '127.0.0.1:80:80'
62
60
  restart: unless-stopped
@@ -68,6 +66,6 @@ In this configuration, cgitize pulls repositories defined in example.toml every
68
66
 
69
67
  To launch containers, run:
70
68
 
71
- docker-compose up -d
69
+ docker compose up -d
72
70
 
73
71
  To inspect the repositories, visit http://localhost:80/.
@@ -8,9 +8,18 @@ ADD ["https://github.com/github/cmark-gfm/archive/refs/tags/$CMARK_GFM_VERSION.z
8
8
 
9
9
  RUN apk add -q --no-cache cmake g++ make python3 && \
10
10
  ln -sf /usr/bin/python3 /usr/bin/python
11
+
11
12
  RUN unzip -q -- "$CMARK_GFM_VERSION.zip" && \
12
13
  cd -- "cmark-gfm-$CMARK_GFM_VERSION" && \
13
- make INSTALL_PREFIX=/cmark-gfm > /dev/null && \
14
+ mkdir build && \
15
+ cd build && \
16
+ cmake \
17
+ -DCMAKE_BUILD_TYPE=Release \
18
+ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
19
+ -DCMAKE_INSTALL_PREFIX=/cmark-gfm \
20
+ -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
21
+ .. && \
22
+ make -j && \
14
23
  make test && \
15
24
  make install > /dev/null
16
25
 
@@ -1,5 +1,3 @@
1
- version: '3'
2
-
3
1
  services:
4
2
  cgitize:
5
3
  build:
@@ -9,13 +9,13 @@ license = {text = "MIT"}
9
9
  dynamic = ["version"]
10
10
  authors = [{name = "Egor Tensin", email = "egor@tensin.name"}]
11
11
  readme = "README.md"
12
- requires-python = ">=3.6"
12
+ requires-python = ">=3.9"
13
13
 
14
14
  dependencies = [
15
- "atlassian-python-api ~= 3.28.0",
15
+ "atlassian-python-api ~= 4.0",
16
16
  'importlib-metadata ~= 4.0 ; python_version < "3.8"',
17
- "PyGithub ~= 1.0",
18
- "python-gitlab ~= 2.0",
17
+ "PyGithub ~= 2.0",
18
+ "python-gitlab ~= 6.0",
19
19
  "tomli ~= 1.0",
20
20
  ]
21
21
 
@@ -0,0 +1,23 @@
1
+ atlassian-python-api==4.0.7
2
+ beautifulsoup4==4.14.3
3
+ certifi==2026.1.4
4
+ cffi==2.0.0
5
+ charset-normalizer==3.4.4
6
+ cryptography==46.0.3
7
+ Deprecated==1.3.1
8
+ idna==3.11
9
+ jmespath==1.0.1
10
+ oauthlib==3.3.1
11
+ pycparser==2.23
12
+ PyGithub==2.8.1
13
+ PyJWT==2.10.1
14
+ PyNaCl==1.6.2
15
+ python-gitlab==6.5.0
16
+ requests==2.32.5
17
+ requests-oauthlib==2.0.0
18
+ requests-toolbelt==1.0.0
19
+ soupsieve==2.8.1
20
+ tomli==1.2.3
21
+ typing_extensions==4.15.0
22
+ urllib3==2.6.3
23
+ wrapt==2.0.1
@@ -1,4 +1,3 @@
1
- version: '3'
2
1
  services:
3
2
  git_server:
4
3
  build:
@@ -17,12 +17,6 @@ readonly client_key_password='password'
17
17
  readonly output_dir="$script_dir/cgitize/output"
18
18
  readonly frontend_host=localhost
19
19
 
20
- if command -v docker-compose > /dev/null 2>&1; then
21
- readonly docker_compose=docker-compose
22
- else
23
- readonly docker_compose='docker compose'
24
- fi
25
-
26
20
  dump() {
27
21
  local prefix="${FUNCNAME[0]}"
28
22
  [ "${#FUNCNAME[@]}" -gt 1 ] && prefix="${FUNCNAME[1]}"
@@ -165,12 +159,12 @@ docker_build() {
165
159
  echo Building Docker images
166
160
  echo ----------------------------------------------------------------------
167
161
 
168
- $docker_compose build --progress plain
162
+ docker compose --progress plain build
169
163
  }
170
164
 
171
165
  docker_cleanup() {
172
166
  dump 'cleaning up Docker data'
173
- $docker_compose down --rmi all --volumes
167
+ docker compose down --rmi all --volumes
174
168
  # Use `docker system prune` as well?
175
169
  }
176
170
 
@@ -186,7 +180,7 @@ run_git_server() {
186
180
  echo Running the Git server
187
181
  echo ----------------------------------------------------------------------
188
182
 
189
- $docker_compose up -d git_server
183
+ docker compose up -d git_server
190
184
  }
191
185
 
192
186
  run_cgitize() {
@@ -200,7 +194,7 @@ run_cgitize() {
200
194
  return 1
201
195
  fi
202
196
  dump "SSH_AUTH_SOCK: $SSH_AUTH_SOCK"
203
- $docker_compose run --rm cgitize
197
+ docker compose run --rm cgitize
204
198
  }
205
199
 
206
200
  run_frontend() {
@@ -209,7 +203,7 @@ run_frontend() {
209
203
  echo Running the frontend
210
204
  echo ----------------------------------------------------------------------
211
205
 
212
- $docker_compose up -d frontend
206
+ docker compose up -d frontend
213
207
  sleep 2
214
208
  }
215
209
 
@@ -0,0 +1,13 @@
1
+ IFS= read -r -s -p 'Bitbucket token: ' CGITIZE_BITBUCKET_TOKEN
2
+ echo
3
+ IFS= read -r -s -p 'GitHub token: ' CGITIZE_GITHUB_TOKEN
4
+ echo
5
+ IFS= read -r -s -p 'GitLab token: ' CGITIZE_GITLAB_TOKEN
6
+ echo
7
+
8
+ export CGITIZE_BITBUCKET_USERNAME=cgitize-test
9
+ export CGITIZE_BITBUCKET_TOKEN
10
+ export CGITIZE_GITHUB_USERNAME=cgitize-test
11
+ export CGITIZE_GITHUB_TOKEN
12
+ export CGITIZE_GITLAB_USERNAME=cgitize-test
13
+ export CGITIZE_GITLAB_TOKEN
@@ -6,12 +6,12 @@
6
6
  import os
7
7
  import unittest
8
8
 
9
- from github import Github, GithubException
9
+ from github import Auth, Github, GithubException
10
10
 
11
11
 
12
12
  class GitHubTests(unittest.TestCase):
13
13
  def setUp(self):
14
- self.github = Github(os.environ.get('CGITIZE_GITHUB_TOKEN'))
14
+ self.github = Github(auth=Auth.Token(os.environ.get('CGITIZE_GITHUB_TOKEN')))
15
15
 
16
16
  def test_nonexistent_repo(self):
17
17
  with self.assertRaises(GithubException):
@@ -1,20 +0,0 @@
1
- atlassian-python-api==3.28.1
2
- certifi==2025.7.14
3
- cffi==1.17.1
4
- charset-normalizer==3.4.2
5
- cryptography==45.0.5
6
- Deprecated==1.2.18
7
- idna==3.10
8
- oauthlib==3.3.1
9
- pycparser==2.22
10
- PyGithub==1.59.1
11
- PyJWT==2.10.1
12
- PyNaCl==1.5.0
13
- python-gitlab==2.10.1
14
- requests==2.32.4
15
- requests-oauthlib==2.0.0
16
- requests-toolbelt==1.0.0
17
- six==1.17.0
18
- tomli==1.2.3
19
- urllib3==2.5.0
20
- wrapt==1.17.2
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