github-backup 0.61.1__py3-none-any.whl → 0.61.2__py3-none-any.whl
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.
- github_backup/__init__.py +1 -1
- github_backup/github_backup.py +10 -3
- {github_backup-0.61.1.dist-info → github_backup-0.61.2.dist-info}/METADATA +12 -1
- github_backup-0.61.2.dist-info/RECORD +11 -0
- github_backup-0.61.1.dist-info/RECORD +0 -11
- {github_backup-0.61.1.dist-info → github_backup-0.61.2.dist-info}/WHEEL +0 -0
- {github_backup-0.61.1.dist-info → github_backup-0.61.2.dist-info}/entry_points.txt +0 -0
- {github_backup-0.61.1.dist-info → github_backup-0.61.2.dist-info}/licenses/LICENSE.txt +0 -0
- {github_backup-0.61.1.dist-info → github_backup-0.61.2.dist-info}/top_level.txt +0 -0
- {github_backup-0.61.1.dist-info → github_backup-0.61.2.dist-info}/zip-safe +0 -0
github_backup/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.61.
|
|
1
|
+
__version__ = "0.61.2"
|
github_backup/github_backup.py
CHANGED
|
@@ -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["Private"]):
|
|
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
|
-
|
|
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.
|
|
3
|
+
Version: 0.61.2
|
|
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
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
github_backup/__init__.py,sha256=-WIJ_hJF1yvHvtvBO1JNouMIkdi1zl3hnbvBpOOoJXM,23
|
|
2
|
+
github_backup/__main__.py,sha256=3yorCiC63maaxbjdtaeAs-G-yAAxKSO3mprhGfa1Fho,271
|
|
3
|
+
github_backup/cli.py,sha256=gPYU0CviuHB19y8RHhcD0p8xHS3UcJbBIK6HVfWazTc,2902
|
|
4
|
+
github_backup/github_backup.py,sha256=UJwLQ3NU4TVxmviFVRGX9bC7NPUR-hE3zjpmzEYnzUI,88140
|
|
5
|
+
github_backup-0.61.2.dist-info/licenses/LICENSE.txt,sha256=ML-pLyn1qtAKo_DHMcQ8-p7k3f8cp-IR-mf5B49R2rk,1085
|
|
6
|
+
github_backup-0.61.2.dist-info/METADATA,sha256=TAUA8FnuarPk__xgEBOd5OaNKdV0QPxIFBSxneg0p7s,28144
|
|
7
|
+
github_backup-0.61.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
8
|
+
github_backup-0.61.2.dist-info/entry_points.txt,sha256=cLPKK7MqC77QVb6HnT2mnyL_f-ciavJG_Y9vVHlCF68,57
|
|
9
|
+
github_backup-0.61.2.dist-info/top_level.txt,sha256=Za6fKRAlxZ0b3ZBH_osPqklLe14LetdNAkvAQANT2AA,14
|
|
10
|
+
github_backup-0.61.2.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
11
|
+
github_backup-0.61.2.dist-info/RECORD,,
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
github_backup/__init__.py,sha256=3UxN07YtETzDhpq7DYM8JY8aOjsIEIETvTVen65rK2k,23
|
|
2
|
-
github_backup/__main__.py,sha256=3yorCiC63maaxbjdtaeAs-G-yAAxKSO3mprhGfa1Fho,271
|
|
3
|
-
github_backup/cli.py,sha256=gPYU0CviuHB19y8RHhcD0p8xHS3UcJbBIK6HVfWazTc,2902
|
|
4
|
-
github_backup/github_backup.py,sha256=ApN6orMb-BlJJVI_PTZZkzteEzuZBhTySydlRWU-Bi0,87911
|
|
5
|
-
github_backup-0.61.1.dist-info/licenses/LICENSE.txt,sha256=ML-pLyn1qtAKo_DHMcQ8-p7k3f8cp-IR-mf5B49R2rk,1085
|
|
6
|
-
github_backup-0.61.1.dist-info/METADATA,sha256=-iHVrHGbT0z0R9VqXbltR7pRxDV18aOnfFdofA73K3s,27503
|
|
7
|
-
github_backup-0.61.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
8
|
-
github_backup-0.61.1.dist-info/entry_points.txt,sha256=cLPKK7MqC77QVb6HnT2mnyL_f-ciavJG_Y9vVHlCF68,57
|
|
9
|
-
github_backup-0.61.1.dist-info/top_level.txt,sha256=Za6fKRAlxZ0b3ZBH_osPqklLe14LetdNAkvAQANT2AA,14
|
|
10
|
-
github_backup-0.61.1.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
11
|
-
github_backup-0.61.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|