Skip to content

Commit 77ab1bd

Browse files
authored
Merge pull request josegonzalez#92 from whwright/87-fix-starred-bug
Clone the specified user's starred repos/gists, not the authenticated user
2 parents 0de341e + 4a4a317 commit 77ab1bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/github-backup

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -530,15 +530,15 @@ def retrieve_repositories(args):
530530
repos = retrieve_data(args, template, single_request=single_request)
531531

532532
if args.all_starred:
533-
starred_template = 'https://{0}/user/starred'.format(get_github_api_host(args))
533+
starred_template = 'https://{0}/users/{1}/starred'.format(get_github_api_host(args), args.user)
534534
starred_repos = retrieve_data(args, starred_template, single_request=False)
535535
# flag each repo as starred for downstream processing
536536
for item in starred_repos:
537537
item.update({'is_starred': True})
538538
repos.extend(starred_repos)
539539

540540
if args.include_gists:
541-
gists_template = 'https://{0}/gists'.format(get_github_api_host(args))
541+
gists_template = 'https://{0}/users/{1}/gists'.format(get_github_api_host(args), args.user)
542542
gists = retrieve_data(args, gists_template, single_request=False)
543543
# flag each repo as a gist for downstream processing
544544
for item in gists:

0 commit comments

Comments
 (0)