Minor changes
This commit is contained in:
parent
5e587e6d98
commit
cbfd402fc9
@ -8,6 +8,8 @@
|
|||||||
# Usage:
|
# Usage:
|
||||||
# python3 gitlab2gitea.py [options]
|
# python3 gitlab2gitea.py [options]
|
||||||
#
|
#
|
||||||
|
# --help Show this help message and exit
|
||||||
|
#
|
||||||
# --gitlab-token <GITLAB_TOKEN> GitLab access token
|
# --gitlab-token <GITLAB_TOKEN> GitLab access token
|
||||||
# --gitlab-url <GITLAB_URL> GitLab URL
|
# --gitlab-url <GITLAB_URL> GitLab URL
|
||||||
# --gitlab-api-version <GITLAB_API_VERSION> GitLab API version (default: v4)
|
# --gitlab-api-version <GITLAB_API_VERSION> GitLab API version (default: v4)
|
||||||
@ -978,8 +980,6 @@ def migrate_groups():
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
_exception(f'Failed to update existing groups: {e}', e)
|
_exception(f'Failed to update existing groups: {e}', e)
|
||||||
|
|
||||||
_info('Group migration completed!')
|
|
||||||
|
|
||||||
def migrate_users():
|
def migrate_users():
|
||||||
gitlab_users = get_gitlab_users()
|
gitlab_users = get_gitlab_users()
|
||||||
gitea_users = get_gitea_users()
|
gitea_users = get_gitea_users()
|
||||||
@ -1017,9 +1017,6 @@ def migrate_users():
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
_exception(f'Failed to update existing users: {e}', e)
|
_exception(f'Failed to update existing users: {e}', e)
|
||||||
|
|
||||||
_info('User migration completed!')
|
|
||||||
|
|
||||||
|
|
||||||
def migrate_projects():
|
def migrate_projects():
|
||||||
gitlab_projects = get_gitlab_projects()
|
gitlab_projects = get_gitlab_projects()
|
||||||
gitea_projects = get_gitea_projects()
|
gitea_projects = get_gitea_projects()
|
||||||
@ -1057,18 +1054,19 @@ def migrate_projects():
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
_exception(f'Failed to update existing projects: {e}', e)
|
_exception(f'Failed to update existing projects: {e}', e)
|
||||||
|
|
||||||
_info('Project migration completed!')
|
|
||||||
|
|
||||||
def run_migration():
|
def run_migration():
|
||||||
|
|
||||||
_info('Migrating GitLab groups...')
|
_info('Migrating GitLab groups...')
|
||||||
migrate_groups()
|
migrate_groups()
|
||||||
|
_info('Group migration completed!')
|
||||||
|
|
||||||
_info('Migrating GitLab users...')
|
_info('Migrating GitLab users...')
|
||||||
migrate_users()
|
migrate_users()
|
||||||
|
_info('User migration completed!')
|
||||||
|
|
||||||
_info('Migrating GitLab projects...')
|
_info('Migrating GitLab projects...')
|
||||||
migrate_projects()
|
migrate_projects()
|
||||||
|
_info('Project migration completed!')
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
_info('Gitlab2Gitea v1.0 - by Zion Networks')
|
_info('Gitlab2Gitea v1.0 - by Zion Networks')
|
||||||
|
Reference in New Issue
Block a user