cgitize 5.1.4__tar.gz → 6.0.0__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 (65) hide show
  1. {cgitize-5.1.4 → cgitize-6.0.0}/.github/workflows/ci.yml +1 -1
  2. {cgitize-5.1.4 → cgitize-6.0.0}/DEVELOPMENT.md +29 -10
  3. {cgitize-5.1.4/cgitize.egg-info → cgitize-6.0.0}/PKG-INFO +5 -5
  4. {cgitize-5.1.4 → cgitize-6.0.0}/cgitize/github.py +5 -2
  5. {cgitize-5.1.4 → cgitize-6.0.0}/cgitize/main.py +2 -0
  6. {cgitize-5.1.4 → cgitize-6.0.0/cgitize.egg-info}/PKG-INFO +5 -5
  7. {cgitize-5.1.4 → cgitize-6.0.0}/cgitize.egg-info/SOURCES.txt +1 -0
  8. {cgitize-5.1.4 → cgitize-6.0.0}/cgitize.egg-info/requires.txt +3 -3
  9. {cgitize-5.1.4 → cgitize-6.0.0}/docker/README.md +2 -2
  10. {cgitize-5.1.4 → cgitize-6.0.0}/pyproject.toml +4 -4
  11. {cgitize-5.1.4 → cgitize-6.0.0}/requirements.txt +7 -4
  12. cgitize-6.0.0/test/set_credentials.sh +13 -0
  13. {cgitize-5.1.4 → cgitize-6.0.0}/test/unit/test_github.py +2 -2
  14. {cgitize-5.1.4 → cgitize-6.0.0}/.dockerignore +0 -0
  15. {cgitize-5.1.4 → cgitize-6.0.0}/.gitattributes +0 -0
  16. {cgitize-5.1.4 → cgitize-6.0.0}/.gitignore +0 -0
  17. {cgitize-5.1.4 → cgitize-6.0.0}/.pylintrc +0 -0
  18. {cgitize-5.1.4 → cgitize-6.0.0}/.python-version +0 -0
  19. {cgitize-5.1.4 → cgitize-6.0.0}/LICENSE.txt +0 -0
  20. {cgitize-5.1.4 → cgitize-6.0.0}/Makefile +0 -0
  21. {cgitize-5.1.4 → cgitize-6.0.0}/README.md +0 -0
  22. {cgitize-5.1.4 → cgitize-6.0.0}/cgitize/__init__.py +0 -0
  23. {cgitize-5.1.4 → cgitize-6.0.0}/cgitize/bitbucket.py +0 -0
  24. {cgitize-5.1.4 → cgitize-6.0.0}/cgitize/cgit.py +0 -0
  25. {cgitize-5.1.4 → cgitize-6.0.0}/cgitize/config.py +0 -0
  26. {cgitize-5.1.4 → cgitize-6.0.0}/cgitize/git.py +0 -0
  27. {cgitize-5.1.4 → cgitize-6.0.0}/cgitize/gitlab.py +0 -0
  28. {cgitize-5.1.4 → cgitize-6.0.0}/cgitize/repo.py +0 -0
  29. {cgitize-5.1.4 → cgitize-6.0.0}/cgitize/utils.py +0 -0
  30. {cgitize-5.1.4 → cgitize-6.0.0}/cgitize/version.py +0 -0
  31. {cgitize-5.1.4 → cgitize-6.0.0}/cgitize.egg-info/dependency_links.txt +0 -0
  32. {cgitize-5.1.4 → cgitize-6.0.0}/cgitize.egg-info/entry_points.txt +0 -0
  33. {cgitize-5.1.4 → cgitize-6.0.0}/cgitize.egg-info/top_level.txt +0 -0
  34. {cgitize-5.1.4 → cgitize-6.0.0}/docker/Dockerfile +0 -0
  35. {cgitize-5.1.4 → cgitize-6.0.0}/docker/cgitize.sh +0 -0
  36. {cgitize-5.1.4 → cgitize-6.0.0}/docker/frontend/Dockerfile +0 -0
  37. {cgitize-5.1.4 → cgitize-6.0.0}/docker/frontend/cmd.sh +0 -0
  38. {cgitize-5.1.4 → cgitize-6.0.0}/docker/frontend/etc/cgit/common +0 -0
  39. {cgitize-5.1.4 → cgitize-6.0.0}/docker/frontend/etc/cgitrc +0 -0
  40. {cgitize-5.1.4 → cgitize-6.0.0}/docker/frontend/etc/nginx/conf.d/default.conf +0 -0
  41. {cgitize-5.1.4 → cgitize-6.0.0}/docker/frontend/usr/lib/cgit/filters/about-formatting.sh +0 -0
  42. {cgitize-5.1.4 → cgitize-6.0.0}/docker/frontend/usr/lib/cgit/filters/html-converters/.gitattributes +0 -0
  43. {cgitize-5.1.4 → cgitize-6.0.0}/docker/frontend/usr/lib/cgit/filters/html-converters/md2html +0 -0
  44. {cgitize-5.1.4 → cgitize-6.0.0}/docker/get_output_dir.py +0 -0
  45. {cgitize-5.1.4 → cgitize-6.0.0}/docker/in_cron.sh +0 -0
  46. {cgitize-5.1.4 → cgitize-6.0.0}/docker-compose.yml +0 -0
  47. {cgitize-5.1.4 → cgitize-6.0.0}/docs/api.md +0 -0
  48. {cgitize-5.1.4 → cgitize-6.0.0}/docs/auth.md +0 -0
  49. {cgitize-5.1.4 → cgitize-6.0.0}/examples/cgitize.toml +0 -0
  50. {cgitize-5.1.4 → cgitize-6.0.0}/examples/docker/cgitize.toml +0 -0
  51. {cgitize-5.1.4 → cgitize-6.0.0}/prelude.mk +0 -0
  52. {cgitize-5.1.4 → cgitize-6.0.0}/setup.cfg +0 -0
  53. {cgitize-5.1.4 → cgitize-6.0.0}/test/__init__.py +0 -0
  54. {cgitize-5.1.4 → cgitize-6.0.0}/test/integration/docker/.dockerignore +0 -0
  55. {cgitize-5.1.4 → cgitize-6.0.0}/test/integration/docker/cgitize/.gitignore +0 -0
  56. {cgitize-5.1.4 → cgitize-6.0.0}/test/integration/docker/cgitize/etc/cgitize.toml +0 -0
  57. {cgitize-5.1.4 → cgitize-6.0.0}/test/integration/docker/docker-compose.yml +0 -0
  58. {cgitize-5.1.4 → cgitize-6.0.0}/test/integration/docker/git_server/Dockerfile +0 -0
  59. {cgitize-5.1.4 → cgitize-6.0.0}/test/integration/docker/git_server/setup_repo.sh +0 -0
  60. {cgitize-5.1.4 → cgitize-6.0.0}/test/integration/docker/test.sh +0 -0
  61. {cgitize-5.1.4 → cgitize-6.0.0}/test/integration/example/test.sh +0 -0
  62. {cgitize-5.1.4 → cgitize-6.0.0}/test/integration/local/test.sh +0 -0
  63. {cgitize-5.1.4 → cgitize-6.0.0}/test/unit/__init__.py +0 -0
  64. {cgitize-5.1.4 → cgitize-6.0.0}/test/unit/test_bitbucket.py +0 -0
  65. {cgitize-5.1.4 → cgitize-6.0.0}/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.8', '3.9', '3.10', '3.11', '3.12', '3.13']
15
+ python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
16
16
  name: 'Test / ${{ matrix.python-version }}'
17
17
  env:
18
18
  CGITIZE_GITHUB_USERNAME: cgitize-test
@@ -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,13 +36,13 @@ 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
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cgitize
3
- Version: 5.1.4
3
+ Version: 6.0.0
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)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cgitize
3
- Version: 5.1.4
3
+ Version: 6.0.0
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
 
@@ -47,6 +47,7 @@ docs/auth.md
47
47
  examples/cgitize.toml
48
48
  examples/docker/cgitize.toml
49
49
  test/__init__.py
50
+ test/set_credentials.sh
50
51
  test/integration/docker/.dockerignore
51
52
  test/integration/docker/docker-compose.yml
52
53
  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"]
@@ -50,13 +50,13 @@ Here's an example docker-compose.yml file:
50
50
  SCHEDULE: '0 */3 * * *'
51
51
  # Set CGITIZE_{GITHUB,BITBUCKET,GITLAB}_{USERNAME,TOKEN} variables
52
52
  # here or in the config file.
53
- image: egortensin/cgitize:5
53
+ image: egortensin/cgitize:6
54
54
  restart: unless-stopped
55
55
  volumes:
56
56
  - ./example.toml:/etc/cgitize/cgitize.toml:ro
57
57
  - /srv/volumes/cgitize:/mnt/cgitize
58
58
  frontend:
59
- image: egortensin/cgitize-frontend:5
59
+ image: egortensin/cgitize-frontend:6
60
60
  ports:
61
61
  - '127.0.0.1:80:80'
62
62
  restart: unless-stopped
@@ -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
 
@@ -1,20 +1,23 @@
1
- atlassian-python-api==3.28.1
1
+ atlassian-python-api==4.0.4
2
+ beautifulsoup4==4.13.4
2
3
  certifi==2025.7.14
3
4
  cffi==1.17.1
4
5
  charset-normalizer==3.4.2
5
6
  cryptography==45.0.5
6
7
  Deprecated==1.2.18
7
8
  idna==3.10
9
+ jmespath==1.0.1
8
10
  oauthlib==3.3.1
9
11
  pycparser==2.22
10
- PyGithub==1.59.1
12
+ PyGithub==2.6.1
11
13
  PyJWT==2.10.1
12
14
  PyNaCl==1.5.0
13
- python-gitlab==2.10.1
15
+ python-gitlab==6.1.0
14
16
  requests==2.32.4
15
17
  requests-oauthlib==2.0.0
16
18
  requests-toolbelt==1.0.0
17
- six==1.17.0
19
+ soupsieve==2.7
18
20
  tomli==1.2.3
21
+ typing_extensions==4.14.1
19
22
  urllib3==2.5.0
20
23
  wrapt==1.17.2
@@ -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):
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