diff options
| author | Don Delmar Davis <don@suspectdevices.com> | 2021-01-09 15:40:18 -0800 |
|---|---|---|
| committer | Don Delmar Davis <don@suspectdevices.com> | 2021-01-09 15:40:18 -0800 |
| commit | 8ca644a149d7be8c2eaedaa47453a5bd2d351f51 (patch) | |
| tree | 29304b7635c674dc5507b7cd23a0a4ac80e7dd66 | |
| parent | c5353f5eefeb81a8b52958dad3f4442e42b9ec46 (diff) | |
Try to separate usernames from github names.
| -rwxr-xr-x | clone-repos.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clone-repos.py b/clone-repos.py index f15b63c..dd78286 100755 --- a/clone-repos.py +++ b/clone-repos.py @@ -82,12 +82,13 @@ gh = Github(github_token) for repo in gh.get_user().get_repos(): # Mirror to Gitea if I haven't forked this repository from elsewhere #if not repo.fork: + print("* mirroring ",repo.full_name) real_repo = repo.full_name.split('/')[1] if real_repo in repo_map: # We're creating the repo in another account (most likely an organization) gitea_dest_user = repo_map[real_repo] else: - gitea_dest_user = gitea_user + gitea_dest_user = repo.full_name.split('/')[0] r = session.get("{0}/users/{1}".format(gitea_url, gitea_dest_user)) if r.status_code != 200: |
