-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -398,6 +398,7 @@ def __init__(self, dry_run=False, verbose=0, progress=None, quiet=False, | |
self.lock = threading.Lock() | ||
|
||
self.session = requests.Session() | ||
self.has_auth_token = bool(token) | ||
if token: | ||
self.session.auth = ('', token) | ||
|
||
|
@@ -441,7 +442,7 @@ def list_repos(self, user=None, organization=None, pattern=None, | |
owner) | ||
elif user and not organization: | ||
owner = user | ||
if include_private: | ||
if include_private and self.has_auth_token: | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
mgedmin
Author
Owner
|
||
# users/$name/repos does not include private repos, so | ||
# we have to query for the repos owned by the current | ||
# user instead. This only works if the current token | ||
|
If include_private is set and there is no token, there will not be any private repos in the output. Maybe that's better than just defaulting include_private to false? It may warrant some docs.