Minor changes

This commit is contained in:
Enrico Ludwig 2024-07-14 13:54:03 +02:00
parent 5e587e6d98
commit cbfd402fc9

View File

@ -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)
@ -977,8 +979,6 @@ def migrate_groups():
_warn('Dry-run mode enabled, skipping update of existing groups on Gitea...') _warn('Dry-run mode enabled, skipping update of existing groups on Gitea...')
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()
@ -1016,9 +1016,6 @@ def migrate_users():
_warn('Dry-run mode enabled, skipping update of existing users on Gitea...') _warn('Dry-run mode enabled, skipping update of existing users on Gitea...')
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()
@ -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')