github-backup 0.65.1__py3-none-any.whl → 0.66.0__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 CHANGED
@@ -1 +1 @@
1
- __version__ = "0.65.1"
1
+ __version__ = "0.66.0"
@@ -1838,6 +1838,11 @@ def retrieve_repositories(args, authenticated_user):
1838
1838
  if args.user == authenticated_user["login"]:
1839
1839
  # we must use the /user/repos API to be able to access private repos
1840
1840
  template = "https://{0}/user/repos".format(get_github_api_host(args))
1841
+ elif args.as_app and not args.organization:
1842
+ # /users/{user}/repos is public-only; the installation sees private repos too
1843
+ template = "https://{0}/installation/repositories".format(
1844
+ get_github_api_host(args)
1845
+ )
1841
1846
  else:
1842
1847
  if args.private and not args.organization:
1843
1848
  logger.warning(
@@ -1868,6 +1873,10 @@ def retrieve_repositories(args, authenticated_user):
1868
1873
  logger.warning(f"Legal notice: {e.legal_url}")
1869
1874
  return []
1870
1875
 
1876
+ if template.endswith("/installation/repositories"):
1877
+ # Each page is {"total_count": ..., "repositories": [...]}
1878
+ repos = [repo for page in repos for repo in page["repositories"]]
1879
+
1871
1880
  return retrieve_additional_repositories(args, authenticated_user, repos)
1872
1881
 
1873
1882
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: github-backup
3
- Version: 0.65.1
3
+ Version: 0.66.0
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
@@ -229,6 +229,8 @@ GitHub Apps
229
229
 
230
230
  GitHub Apps are ideal for organization backups in CI/CD. Tokens are scoped to specific repositories and expire after 1 hour.
231
231
 
232
+ For a user account (no ``--organization``), ``--as-app`` lists the repositories the installation can access, so private repositories are included.
233
+
232
234
  **One-time setup:**
233
235
 
234
236
  1. Create a GitHub App at *Settings -> Developer Settings -> GitHub Apps -> New GitHub App*
@@ -0,0 +1,12 @@
1
+ github_backup/__init__.py,sha256=rdBd9Kj9DDCtQNzVZEbaE1YatB7HZXL9qX4Ge-gXzaM,23
2
+ github_backup/__main__.py,sha256=3yorCiC63maaxbjdtaeAs-G-yAAxKSO3mprhGfa1Fho,271
3
+ github_backup/cli.py,sha256=JTiXPOvB8id8LopREOEd1W_FLvuf9SOZU5buMRPFd9U,2922
4
+ github_backup/github_backup.py,sha256=zvWTp4_02ep-O7lE0fNuIBdMpN7wHKanboC4hydLXhA,127118
5
+ github_backup/graphql_queries.py,sha256=XcAQyp9nF7Ip9UzxsrXMkl2pO-W7SK8hhO2oE9HVcmA,6658
6
+ github_backup-0.66.0.dist-info/licenses/LICENSE.txt,sha256=ML-pLyn1qtAKo_DHMcQ8-p7k3f8cp-IR-mf5B49R2rk,1085
7
+ github_backup-0.66.0.dist-info/METADATA,sha256=x9vCzseh_H9lmtHA3Wb1O0iS1rlvAfrONsLMuco26eM,36196
8
+ github_backup-0.66.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
9
+ github_backup-0.66.0.dist-info/entry_points.txt,sha256=cLPKK7MqC77QVb6HnT2mnyL_f-ciavJG_Y9vVHlCF68,57
10
+ github_backup-0.66.0.dist-info/top_level.txt,sha256=Za6fKRAlxZ0b3ZBH_osPqklLe14LetdNAkvAQANT2AA,14
11
+ github_backup-0.66.0.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
12
+ github_backup-0.66.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (83.0.0)
2
+ Generator: setuptools (84.2.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,12 +0,0 @@
1
- github_backup/__init__.py,sha256=rGqIS-DtyspfkizhuNt82yLT-d6kScjVTMqpbJpBReo,23
2
- github_backup/__main__.py,sha256=3yorCiC63maaxbjdtaeAs-G-yAAxKSO3mprhGfa1Fho,271
3
- github_backup/cli.py,sha256=JTiXPOvB8id8LopREOEd1W_FLvuf9SOZU5buMRPFd9U,2922
4
- github_backup/github_backup.py,sha256=XZjLwdQ8OftyImqmW2zMgqn8sEfuhAfAvmfNhdxF23o,126671
5
- github_backup/graphql_queries.py,sha256=XcAQyp9nF7Ip9UzxsrXMkl2pO-W7SK8hhO2oE9HVcmA,6658
6
- github_backup-0.65.1.dist-info/licenses/LICENSE.txt,sha256=ML-pLyn1qtAKo_DHMcQ8-p7k3f8cp-IR-mf5B49R2rk,1085
7
- github_backup-0.65.1.dist-info/METADATA,sha256=r2IogtJ7P6ZA7ITMRM6h3yXhCFy9y2OrINvzzkz-Js8,36048
8
- github_backup-0.65.1.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
9
- github_backup-0.65.1.dist-info/entry_points.txt,sha256=cLPKK7MqC77QVb6HnT2mnyL_f-ciavJG_Y9vVHlCF68,57
10
- github_backup-0.65.1.dist-info/top_level.txt,sha256=Za6fKRAlxZ0b3ZBH_osPqklLe14LetdNAkvAQANT2AA,14
11
- github_backup-0.65.1.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
12
- github_backup-0.65.1.dist-info/RECORD,,