github-backup 0.61.1__tar.gz → 0.61.3__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 (30) hide show
  1. {github_backup-0.61.1 → github_backup-0.61.3}/CHANGES.rst +67 -1
  2. {github_backup-0.61.1/github_backup.egg-info → github_backup-0.61.3}/PKG-INFO +12 -1
  3. {github_backup-0.61.1 → github_backup-0.61.3}/README +11 -0
  4. {github_backup-0.61.1 → github_backup-0.61.3}/README.rst +11 -0
  5. github_backup-0.61.3/github_backup/__init__.py +1 -0
  6. {github_backup-0.61.1 → github_backup-0.61.3}/github_backup/github_backup.py +10 -3
  7. {github_backup-0.61.1 → github_backup-0.61.3/github_backup.egg-info}/PKG-INFO +12 -1
  8. {github_backup-0.61.1 → github_backup-0.61.3}/release-requirements.txt +2 -2
  9. github_backup-0.61.1/github_backup/__init__.py +0 -1
  10. {github_backup-0.61.1 → github_backup-0.61.3}/LICENSE.txt +0 -0
  11. {github_backup-0.61.1 → github_backup-0.61.3}/MANIFEST.in +0 -0
  12. {github_backup-0.61.1 → github_backup-0.61.3}/github_backup/__main__.py +0 -0
  13. {github_backup-0.61.1 → github_backup-0.61.3}/github_backup/cli.py +0 -0
  14. {github_backup-0.61.1 → github_backup-0.61.3}/github_backup.egg-info/SOURCES.txt +0 -0
  15. {github_backup-0.61.1 → github_backup-0.61.3}/github_backup.egg-info/dependency_links.txt +0 -0
  16. {github_backup-0.61.1 → github_backup-0.61.3}/github_backup.egg-info/entry_points.txt +0 -0
  17. {github_backup-0.61.1 → github_backup-0.61.3}/github_backup.egg-info/top_level.txt +0 -0
  18. {github_backup-0.61.1 → github_backup-0.61.3}/github_backup.egg-info/zip-safe +0 -0
  19. {github_backup-0.61.1 → github_backup-0.61.3}/requirements.txt +0 -0
  20. {github_backup-0.61.1 → github_backup-0.61.3}/setup.cfg +0 -0
  21. {github_backup-0.61.1 → github_backup-0.61.3}/setup.py +0 -0
  22. {github_backup-0.61.1 → github_backup-0.61.3}/tests/test_all_starred.py +0 -0
  23. {github_backup-0.61.1 → github_backup-0.61.3}/tests/test_attachments.py +0 -0
  24. {github_backup-0.61.1 → github_backup-0.61.3}/tests/test_case_sensitivity.py +0 -0
  25. {github_backup-0.61.1 → github_backup-0.61.3}/tests/test_http_451.py +0 -0
  26. {github_backup-0.61.1 → github_backup-0.61.3}/tests/test_json_dump_if_changed.py +0 -0
  27. {github_backup-0.61.1 → github_backup-0.61.3}/tests/test_pagination.py +0 -0
  28. {github_backup-0.61.1 → github_backup-0.61.3}/tests/test_retrieve_data.py +0 -0
  29. {github_backup-0.61.1 → github_backup-0.61.3}/tests/test_skip_assets_on.py +0 -0
  30. {github_backup-0.61.1 → github_backup-0.61.3}/tests/test_starred_skip_size_over.py +0 -0
@@ -1,9 +1,75 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
- 0.61.1 (2026-01-13)
4
+ 0.61.3 (2026-01-24)
5
5
  -------------------
6
6
  ------------------------
7
+ - Fix KeyError: 'Private' when using --all flag (#481) [Rodos]
8
+
9
+ The repository dictionary uses lowercase "private" key. Use .get() with
10
+ the correct case to match the pattern used elsewhere in the codebase.
11
+
12
+ The bug only affects --all users since --security-advisories short-circuits
13
+ before the key access.
14
+ - Chore(deps): bump setuptools in the python-packages group.
15
+ [dependabot[bot]]
16
+
17
+ Bumps the python-packages group with 1 update: [setuptools](https://github.com/pypa/setuptools).
18
+
19
+
20
+ Updates `setuptools` from 80.9.0 to 80.10.1
21
+ - [Release notes](https://github.com/pypa/setuptools/releases)
22
+ - [Changelog](https://github.com/pypa/setuptools/blob/main/NEWS.rst)
23
+ - [Commits](https://github.com/pypa/setuptools/compare/v80.9.0...v80.10.1)
24
+
25
+ ---
26
+ updated-dependencies:
27
+ - dependency-name: setuptools
28
+ dependency-version: 80.10.1
29
+ dependency-type: direct:production
30
+ update-type: version-update:semver-minor
31
+ dependency-group: python-packages
32
+ ...
33
+
34
+
35
+ 0.61.2 (2026-01-19)
36
+ -------------------
37
+
38
+ Fix
39
+ ~~~
40
+ - Skip security advisories for private repos unless explicitly
41
+ requested. [Lukas Bestle]
42
+ - Handle 404 errors on security advisories. [Lukas Bestle]
43
+
44
+ Other
45
+ ~~~~~
46
+ - Chore(deps): bump black in the python-packages group.
47
+ [dependabot[bot]]
48
+
49
+ Bumps the python-packages group with 1 update: [black](https://github.com/psf/black).
50
+
51
+
52
+ Updates `black` from 25.12.0 to 26.1.0
53
+ - [Release notes](https://github.com/psf/black/releases)
54
+ - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
55
+ - [Commits](https://github.com/psf/black/compare/25.12.0...26.1.0)
56
+
57
+ ---
58
+ updated-dependencies:
59
+ - dependency-name: black
60
+ dependency-version: 26.1.0
61
+ dependency-type: direct:production
62
+ update-type: version-update:semver-major
63
+ dependency-group: python-packages
64
+ ...
65
+ - Docs: Explain security advisories in README. [Lukas Bestle]
66
+ - Feat: Only make security advisory dir if successful. [Lukas Bestle]
67
+
68
+ Avoids empty directories for private repos
69
+
70
+
71
+ 0.61.1 (2026-01-13)
72
+ -------------------
7
73
  - Refactor test fixtures to use shared create_args helper. [Rodos]
8
74
 
9
75
  Uses the real parse_args() function to get CLI defaults, so when
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: github-backup
3
- Version: 0.61.1
3
+ Version: 0.61.3
4
4
  Summary: backup a github user or organization
5
5
  Home-page: http://github.com/josegonzalez/python-github-backup
6
6
  Author: Jose Diaz-Gonzalez
@@ -314,6 +314,17 @@ The tool automatically extracts file extensions from HTTP headers to ensure file
314
314
  **Fine-grained token limitation:** Due to a GitHub platform limitation, fine-grained personal access tokens (``github_pat_...``) cannot download attachments from private repositories directly. This affects both ``/assets/`` (images) and ``/files/`` (documents) URLs. The tool implements a workaround for image attachments using GitHub's Markdown API, which converts URLs to temporary JWT-signed URLs that can be downloaded. However, this workaround only works for images - document attachments (PDFs, text files, etc.) will fail with 404 errors when using fine-grained tokens on private repos. For full attachment support on private repositories, use a classic token (``-t``) instead of a fine-grained token (``-f``). See `#477 <https://github.com/josegonzalez/python-github-backup/issues/477>`_ for details.
315
315
 
316
316
 
317
+ About security advisories
318
+ -------------------------
319
+
320
+ GitHub security advisories are only available in public repositories. GitHub does not provide the respective API endpoint for private repositories.
321
+
322
+ Therefore the logic is implemented as follows:
323
+ - Security advisories are included in the `--all` option.
324
+ - If only the `--all` option was provided, backups of security advisories are skipped for private repositories.
325
+ - If the `--security-advisories` option is provided (on its own or in addition to `--all`), a backup of security advisories is attempted for all repositories, with graceful handling if the GitHub API doesn't return any.
326
+
327
+
317
328
  Run in Docker container
318
329
  -----------------------
319
330
 
@@ -284,6 +284,17 @@ The tool automatically extracts file extensions from HTTP headers to ensure file
284
284
  **Fine-grained token limitation:** Due to a GitHub platform limitation, fine-grained personal access tokens (``github_pat_...``) cannot download attachments from private repositories directly. This affects both ``/assets/`` (images) and ``/files/`` (documents) URLs. The tool implements a workaround for image attachments using GitHub's Markdown API, which converts URLs to temporary JWT-signed URLs that can be downloaded. However, this workaround only works for images - document attachments (PDFs, text files, etc.) will fail with 404 errors when using fine-grained tokens on private repos. For full attachment support on private repositories, use a classic token (``-t``) instead of a fine-grained token (``-f``). See `#477 <https://github.com/josegonzalez/python-github-backup/issues/477>`_ for details.
285
285
 
286
286
 
287
+ About security advisories
288
+ -------------------------
289
+
290
+ GitHub security advisories are only available in public repositories. GitHub does not provide the respective API endpoint for private repositories.
291
+
292
+ Therefore the logic is implemented as follows:
293
+ - Security advisories are included in the `--all` option.
294
+ - If only the `--all` option was provided, backups of security advisories are skipped for private repositories.
295
+ - If the `--security-advisories` option is provided (on its own or in addition to `--all`), a backup of security advisories is attempted for all repositories, with graceful handling if the GitHub API doesn't return any.
296
+
297
+
287
298
  Run in Docker container
288
299
  -----------------------
289
300
 
@@ -284,6 +284,17 @@ The tool automatically extracts file extensions from HTTP headers to ensure file
284
284
  **Fine-grained token limitation:** Due to a GitHub platform limitation, fine-grained personal access tokens (``github_pat_...``) cannot download attachments from private repositories directly. This affects both ``/assets/`` (images) and ``/files/`` (documents) URLs. The tool implements a workaround for image attachments using GitHub's Markdown API, which converts URLs to temporary JWT-signed URLs that can be downloaded. However, this workaround only works for images - document attachments (PDFs, text files, etc.) will fail with 404 errors when using fine-grained tokens on private repos. For full attachment support on private repositories, use a classic token (``-t``) instead of a fine-grained token (``-f``). See `#477 <https://github.com/josegonzalez/python-github-backup/issues/477>`_ for details.
285
285
 
286
286
 
287
+ About security advisories
288
+ -------------------------
289
+
290
+ GitHub security advisories are only available in public repositories. GitHub does not provide the respective API endpoint for private repositories.
291
+
292
+ Therefore the logic is implemented as follows:
293
+ - Security advisories are included in the `--all` option.
294
+ - If only the `--all` option was provided, backups of security advisories are skipped for private repositories.
295
+ - If the `--security-advisories` option is provided (on its own or in addition to `--all`), a backup of security advisories is attempted for all repositories, with graceful handling if the GitHub API doesn't return any.
296
+
297
+
287
298
  Run in Docker container
288
299
  -----------------------
289
300
 
@@ -0,0 +1 @@
1
+ __version__ = "0.61.3"
@@ -1814,7 +1814,7 @@ def backup_repositories(args, output_directory, repositories):
1814
1814
  if args.include_milestones or args.include_everything:
1815
1815
  backup_milestones(args, repo_cwd, repository, repos_template)
1816
1816
 
1817
- if args.include_security_advisories or args.include_everything:
1817
+ if args.include_security_advisories or (args.include_everything and not repository.get("private", False)):
1818
1818
  backup_security_advisories(args, repo_cwd, repository, repos_template)
1819
1819
 
1820
1820
  if args.include_labels or args.include_everything:
@@ -2039,13 +2039,20 @@ def backup_security_advisories(args, repo_cwd, repository, repos_template):
2039
2039
  return
2040
2040
 
2041
2041
  logger.info("Retrieving {0} security advisories".format(repository["full_name"]))
2042
- mkdir_p(repo_cwd, advisory_cwd)
2043
2042
 
2044
2043
  template = "{0}/{1}/security-advisories".format(
2045
2044
  repos_template, repository["full_name"]
2046
2045
  )
2047
2046
 
2048
- _advisories = retrieve_data(args, template)
2047
+ try:
2048
+ _advisories = retrieve_data(args, template)
2049
+ except Exception as e:
2050
+ if "404" in str(e):
2051
+ logger.info("Security advisories are not available for this repository, skipping")
2052
+ return
2053
+ raise
2054
+
2055
+ mkdir_p(repo_cwd, advisory_cwd)
2049
2056
 
2050
2057
  advisories = {}
2051
2058
  for advisory in _advisories:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: github-backup
3
- Version: 0.61.1
3
+ Version: 0.61.3
4
4
  Summary: backup a github user or organization
5
5
  Home-page: http://github.com/josegonzalez/python-github-backup
6
6
  Author: Jose Diaz-Gonzalez
@@ -314,6 +314,17 @@ The tool automatically extracts file extensions from HTTP headers to ensure file
314
314
  **Fine-grained token limitation:** Due to a GitHub platform limitation, fine-grained personal access tokens (``github_pat_...``) cannot download attachments from private repositories directly. This affects both ``/assets/`` (images) and ``/files/`` (documents) URLs. The tool implements a workaround for image attachments using GitHub's Markdown API, which converts URLs to temporary JWT-signed URLs that can be downloaded. However, this workaround only works for images - document attachments (PDFs, text files, etc.) will fail with 404 errors when using fine-grained tokens on private repos. For full attachment support on private repositories, use a classic token (``-t``) instead of a fine-grained token (``-f``). See `#477 <https://github.com/josegonzalez/python-github-backup/issues/477>`_ for details.
315
315
 
316
316
 
317
+ About security advisories
318
+ -------------------------
319
+
320
+ GitHub security advisories are only available in public repositories. GitHub does not provide the respective API endpoint for private repositories.
321
+
322
+ Therefore the logic is implemented as follows:
323
+ - Security advisories are included in the `--all` option.
324
+ - If only the `--all` option was provided, backups of security advisories are skipped for private repositories.
325
+ - If the `--security-advisories` option is provided (on its own or in addition to `--all`), a backup of security advisories is attempted for all repositories, with graceful handling if the GitHub API doesn't return any.
326
+
327
+
317
328
  Run in Docker container
318
329
  -----------------------
319
330
 
@@ -1,6 +1,6 @@
1
1
  # Linting & Formatting
2
2
  autopep8==2.3.2
3
- black==25.12.0
3
+ black==26.1.0
4
4
  flake8==7.3.0
5
5
 
6
6
  # Testing
@@ -9,7 +9,7 @@ pytest==9.0.2
9
9
  # Release & Publishing
10
10
  twine==6.2.0
11
11
  gitchangelog==3.0.4
12
- setuptools==80.9.0
12
+ setuptools==80.10.1
13
13
 
14
14
  # Documentation
15
15
  restructuredtext-lint==2.0.2
@@ -1 +0,0 @@
1
- __version__ = "0.61.1"
File without changes
File without changes