github-backup 0.50.2__tar.gz → 0.50.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.
@@ -1,9 +1,167 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
- 0.50.2 (2025-06-16)
4
+ 0.50.3 (2025-08-08)
5
5
  -------------------
6
6
  ------------------------
7
+ - Revert "Add conditional check for git checkout in development path"
8
+ [Eric Wheeler]
9
+
10
+ This reverts commit 1bad563e3f23d3d8b9f98721d857a660692f4847.
11
+ - Fix -R flag to allow backups of repositories not owned by user. [Eric
12
+ Wheeler]
13
+
14
+ Previously, using -R flag would show zero issues/PRs for repositories
15
+ not owned by the primary user due to incorrect pagination parameters
16
+ being added to single repository API calls.
17
+
18
+ - Remove pagination parameters for single repository requests
19
+ - Support owner/repo format in -R flag (e.g., -R owner/repo-name)
20
+ - Skip filtering when specific repository is requested
21
+ - Fix URL construction for requests without query parameters
22
+
23
+ This enables backing up any repository, not just those owned by the
24
+ primary user specified in -u flag.
25
+ - Add conditional check for git checkout in development path. [Eric
26
+ Wheeler]
27
+
28
+ Only insert development path into sys.path when running from a git checkout
29
+ (when ../.git exists). This makes the script more robust by only using the
30
+ development tree when available and falling back to installed package otherwise.
31
+ - Chore(deps): bump the python-packages group across 1 directory with 3
32
+ updates. [dependabot[bot]]
33
+
34
+ Bumps the python-packages group with 3 updates in the / directory: [certifi](https://github.com/certifi/python-certifi), [docutils](https://github.com/rtfd/recommonmark) and [rich](https://github.com/Textualize/rich).
35
+
36
+
37
+ Updates `certifi` from 2025.7.9 to 2025.7.14
38
+ - [Commits](https://github.com/certifi/python-certifi/compare/2025.07.09...2025.07.14)
39
+
40
+ Updates `docutils` from 0.21.2 to 0.22
41
+ - [Changelog](https://github.com/readthedocs/recommonmark/blob/master/CHANGELOG.md)
42
+ - [Commits](https://github.com/rtfd/recommonmark/commits)
43
+
44
+ Updates `rich` from 14.0.0 to 14.1.0
45
+ - [Release notes](https://github.com/Textualize/rich/releases)
46
+ - [Changelog](https://github.com/Textualize/rich/blob/master/CHANGELOG.md)
47
+ - [Commits](https://github.com/Textualize/rich/compare/v14.0.0...v14.1.0)
48
+
49
+ ---
50
+ updated-dependencies:
51
+ - dependency-name: certifi
52
+ dependency-version: 2025.7.14
53
+ dependency-type: direct:production
54
+ update-type: version-update:semver-patch
55
+ dependency-group: python-packages
56
+ - dependency-name: docutils
57
+ dependency-version: '0.22'
58
+ dependency-type: direct:production
59
+ update-type: version-update:semver-minor
60
+ dependency-group: python-packages
61
+ - dependency-name: rich
62
+ dependency-version: 14.1.0
63
+ dependency-type: direct:production
64
+ update-type: version-update:semver-minor
65
+ dependency-group: python-packages
66
+ ...
67
+ - Chore(deps): bump certifi in the python-packages group.
68
+ [dependabot[bot]]
69
+
70
+ Bumps the python-packages group with 1 update: [certifi](https://github.com/certifi/python-certifi).
71
+
72
+
73
+ Updates `certifi` from 2025.6.15 to 2025.7.9
74
+ - [Commits](https://github.com/certifi/python-certifi/compare/2025.06.15...2025.07.09)
75
+
76
+ ---
77
+ updated-dependencies:
78
+ - dependency-name: certifi
79
+ dependency-version: 2025.7.9
80
+ dependency-type: direct:production
81
+ update-type: version-update:semver-minor
82
+ dependency-group: python-packages
83
+ ...
84
+ - Chore(deps): bump urllib3 from 2.4.0 to 2.5.0. [dependabot[bot]]
85
+
86
+ Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.4.0 to 2.5.0.
87
+ - [Release notes](https://github.com/urllib3/urllib3/releases)
88
+ - [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
89
+ - [Commits](https://github.com/urllib3/urllib3/compare/2.4.0...2.5.0)
90
+
91
+ ---
92
+ updated-dependencies:
93
+ - dependency-name: urllib3
94
+ dependency-version: 2.5.0
95
+ dependency-type: direct:production
96
+ ...
97
+ - Chore(deps): bump the python-packages group with 5 updates.
98
+ [dependabot[bot]]
99
+
100
+ Bumps the python-packages group with 5 updates:
101
+
102
+ | Package | From | To |
103
+ | --- | --- | --- |
104
+ | [flake8](https://github.com/pycqa/flake8) | `7.2.0` | `7.3.0` |
105
+ | [pycodestyle](https://github.com/PyCQA/pycodestyle) | `2.13.0` | `2.14.0` |
106
+ | [pyflakes](https://github.com/PyCQA/pyflakes) | `3.3.2` | `3.4.0` |
107
+ | [pygments](https://github.com/pygments/pygments) | `2.19.1` | `2.19.2` |
108
+ | [urllib3](https://github.com/urllib3/urllib3) | `2.4.0` | `2.5.0` |
109
+
110
+
111
+ Updates `flake8` from 7.2.0 to 7.3.0
112
+ - [Commits](https://github.com/pycqa/flake8/compare/7.2.0...7.3.0)
113
+
114
+ Updates `pycodestyle` from 2.13.0 to 2.14.0
115
+ - [Release notes](https://github.com/PyCQA/pycodestyle/releases)
116
+ - [Changelog](https://github.com/PyCQA/pycodestyle/blob/main/CHANGES.txt)
117
+ - [Commits](https://github.com/PyCQA/pycodestyle/compare/2.13.0...2.14.0)
118
+
119
+ Updates `pyflakes` from 3.3.2 to 3.4.0
120
+ - [Changelog](https://github.com/PyCQA/pyflakes/blob/main/NEWS.rst)
121
+ - [Commits](https://github.com/PyCQA/pyflakes/compare/3.3.2...3.4.0)
122
+
123
+ Updates `pygments` from 2.19.1 to 2.19.2
124
+ - [Release notes](https://github.com/pygments/pygments/releases)
125
+ - [Changelog](https://github.com/pygments/pygments/blob/master/CHANGES)
126
+ - [Commits](https://github.com/pygments/pygments/compare/2.19.1...2.19.2)
127
+
128
+ Updates `urllib3` from 2.4.0 to 2.5.0
129
+ - [Release notes](https://github.com/urllib3/urllib3/releases)
130
+ - [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
131
+ - [Commits](https://github.com/urllib3/urllib3/compare/2.4.0...2.5.0)
132
+
133
+ ---
134
+ updated-dependencies:
135
+ - dependency-name: flake8
136
+ dependency-version: 7.3.0
137
+ dependency-type: direct:production
138
+ update-type: version-update:semver-minor
139
+ dependency-group: python-packages
140
+ - dependency-name: pycodestyle
141
+ dependency-version: 2.14.0
142
+ dependency-type: direct:production
143
+ update-type: version-update:semver-minor
144
+ dependency-group: python-packages
145
+ - dependency-name: pyflakes
146
+ dependency-version: 3.4.0
147
+ dependency-type: direct:production
148
+ update-type: version-update:semver-minor
149
+ dependency-group: python-packages
150
+ - dependency-name: pygments
151
+ dependency-version: 2.19.2
152
+ dependency-type: direct:production
153
+ update-type: version-update:semver-patch
154
+ dependency-group: python-packages
155
+ - dependency-name: urllib3
156
+ dependency-version: 2.5.0
157
+ dependency-type: direct:production
158
+ update-type: version-update:semver-minor
159
+ dependency-group: python-packages
160
+ ...
161
+
162
+
163
+ 0.50.2 (2025-06-16)
164
+ -------------------
7
165
  - Chore(deps): bump certifi in the python-packages group.
8
166
  [dependabot[bot]]
9
167
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: github-backup
3
- Version: 0.50.2
3
+ Version: 0.50.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
@@ -0,0 +1 @@
1
+ __version__ = "0.50.3"
@@ -578,10 +578,15 @@ def retrieve_data_gen(args, template, query_args=None, single_request=False):
578
578
  page = 0
579
579
 
580
580
  while True:
581
- page = page + 1
581
+ if single_request:
582
+ request_page, request_per_page = None, None
583
+ else:
584
+ page = page + 1
585
+ request_page, request_per_page = page, per_page
586
+
582
587
  request = _construct_request(
583
- per_page,
584
- page,
588
+ request_per_page,
589
+ request_page,
585
590
  query_args,
586
591
  template,
587
592
  auth,
@@ -715,14 +720,22 @@ def _get_response(request, auth, template):
715
720
  def _construct_request(
716
721
  per_page, page, query_args, template, auth, as_app=None, fine=False
717
722
  ):
718
- querystring = urlencode(
719
- dict(
720
- list({"per_page": per_page, "page": page}.items())
721
- + list(query_args.items())
722
- )
723
- )
723
+ all_query_args = {}
724
+ if per_page:
725
+ all_query_args["per_page"] = per_page
726
+ if page:
727
+ all_query_args["page"] = page
728
+ if query_args:
729
+ all_query_args.update(query_args)
730
+
731
+ request_url = template
732
+ if all_query_args:
733
+ querystring = urlencode(all_query_args)
734
+ request_url = template + "?" + querystring
735
+ else:
736
+ querystring = ""
724
737
 
725
- request = Request(template + "?" + querystring)
738
+ request = Request(request_url)
726
739
  if auth is not None:
727
740
  if not as_app:
728
741
  if fine:
@@ -735,7 +748,11 @@ def _construct_request(
735
748
  request.add_header(
736
749
  "Accept", "application/vnd.github.machine-man-preview+json"
737
750
  )
738
- logger.info("Requesting {}?{}".format(template, querystring))
751
+
752
+ log_url = template
753
+ if querystring:
754
+ log_url += "?" + querystring
755
+ logger.info("Requesting {}".format(log_url))
739
756
  return request
740
757
 
741
758
 
@@ -885,9 +902,13 @@ def retrieve_repositories(args, authenticated_user):
885
902
  )
886
903
 
887
904
  if args.repository:
905
+ if "/" in args.repository:
906
+ repo_path = args.repository
907
+ else:
908
+ repo_path = "{0}/{1}".format(args.user, args.repository)
888
909
  single_request = True
889
- template = "https://{0}/repos/{1}/{2}".format(
890
- get_github_api_host(args), args.user, args.repository
910
+ template = "https://{0}/repos/{1}".format(
911
+ get_github_api_host(args), repo_path
891
912
  )
892
913
 
893
914
  repos = retrieve_data(args, template, single_request=single_request)
@@ -928,6 +949,8 @@ def retrieve_repositories(args, authenticated_user):
928
949
 
929
950
 
930
951
  def filter_repositories(args, unfiltered_repositories):
952
+ if args.repository:
953
+ return unfiltered_repositories
931
954
  logger.info("Filtering repositories")
932
955
 
933
956
  repositories = []
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: github-backup
3
- Version: 0.50.2
3
+ Version: 0.50.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
@@ -1,12 +1,12 @@
1
1
  autopep8==2.3.2
2
2
  black==25.1.0
3
3
  bleach==6.2.0
4
- certifi==2025.6.15
4
+ certifi==2025.7.14
5
5
  charset-normalizer==3.4.2
6
6
  click==8.1.8
7
7
  colorama==0.4.6
8
- docutils==0.21.2
9
- flake8==7.2.0
8
+ docutils==0.22
9
+ flake8==7.3.0
10
10
  gitchangelog==3.0.4
11
11
  idna==3.10
12
12
  importlib-metadata==8.7.0
@@ -21,19 +21,19 @@ packaging==25.0
21
21
  pathspec==0.12.1
22
22
  pkginfo==1.12.1.2
23
23
  platformdirs==4.3.8
24
- pycodestyle==2.13.0
25
- pyflakes==3.3.2
26
- Pygments==2.19.1
24
+ pycodestyle==2.14.0
25
+ pyflakes==3.4.0
26
+ Pygments==2.19.2
27
27
  readme-renderer==44.0
28
28
  requests==2.32.4
29
29
  requests-toolbelt==1.0.0
30
30
  restructuredtext-lint==1.4.0
31
31
  rfc3986==2.0.0
32
- rich==14.0.0
32
+ rich==14.1.0
33
33
  setuptools==80.9.0
34
34
  six==1.17.0
35
35
  tqdm==4.67.1
36
36
  twine==6.1.0
37
- urllib3==2.4.0
37
+ urllib3==2.5.0
38
38
  webencodings==0.5.1
39
39
  zipp==3.23.0
@@ -1 +0,0 @@
1
- __version__ = "0.50.2"
File without changes
File without changes
File without changes