From 03514cd49774b02b7d07c194bbd632e111bb551a Mon Sep 17 00:00:00 2001 From: Enrico Ludwig Date: Thu, 18 Jul 2024 12:10:18 +0200 Subject: [PATCH] Removed example data --- gitlab2gitea/gitlab2gitea.py | 169 ----------------------------------- 1 file changed, 169 deletions(-) diff --git a/gitlab2gitea/gitlab2gitea.py b/gitlab2gitea/gitlab2gitea.py index 494788a..7ec6559 100644 --- a/gitlab2gitea/gitlab2gitea.py +++ b/gitlab2gitea/gitlab2gitea.py @@ -930,75 +930,6 @@ def convert_gitlab_user_to_gitea(user: dict, extra_data: dict = None) -> dict: def cmp_gitlab_gitea_groups(gitlab_groups: list, gitea_groups: list) -> dict: - # 0 = exists on both - # 1 = exists on GitLab only - # 2 = exists on Gitea only - # planned structure: - # { - # 'groupname' : 0, - # 'groupname2' : 1, - # 'groupname3' : 2 - # } - - # Example for GitLab groups - # [ - # { - # "id": 15, - # "web_url": "https://gitlab.example.org/groups/developers", - # "name": "Developers", - # "path": "developers", - # "description": "", - # "visibility": "private", - # "share_with_group_lock": false, - # "require_two_factor_authentication": false, - # "two_factor_grace_period": 48, - # "project_creation_level": "developer", - # "auto_devops_enabled": null, - # "subgroup_creation_level": "maintainer", - # "emails_disabled": false, - # "emails_enabled": true, - # "mentions_disabled": null, - # "lfs_enabled": true, - # "math_rendering_limits_enabled": true, - # "lock_math_rendering_limits_enabled": false, - # "default_branch": null, - # "default_branch_protection": 1, - # "default_branch_protection_defaults": { - # "allowed_to_push": [{"access_level": 30}], - # "allow_force_push": false, - # "allowed_to_merge": [{"access_level": 40}] - # }, - # "avatar_url": null, - # "request_access_enabled": true, - # "full_name": "Developers", - # "full_path": "developers", - # "created_at": "2020-08-10T20:27:23.487Z", - # "parent_id": null, - # "organization_id": 1, - # "shared_runners_setting": "enabled", - # "ldap_cn": null, - # "ldap_access": null, - # "wiki_access_level": "enabled" - # } - # ] - - # Example for Gitea groups - # [ - # { - # "id": 3, - # "name": "Developers", - # "full_name": "", - # "email": "", - # "avatar_url": "http://gitea.example.org/avatars/9f8ea65601abbf666adcec2b128180e4", - # "description": "", - # "website": "", - # "location": "", - # "visibility": "public", - # "repo_admin_change_team_access": True, - # "username": "Developers", - # } - # ] - compare_result = {} missing_matches = 0 @@ -1037,106 +968,6 @@ def cmp_gitlab_gitea_groups(gitlab_groups: list, gitea_groups: list) -> dict: def cmp_gitlab_gitea_users(gitlab_users: list, gitea_users: list) -> dict: - # 0 = exists on both - # 1 = exists on GitLab only - # 2 = exists on Gitea only - # planned structure: - # { - # 'username' : 0, - # 'username2' : 1, - # 'username3' : 2 - # } - - # Structure on Gitlab - # [ - # { - # "id": 3, - # "username": "user.name", - # "name": "user.name", - # "state": "active", - # "locked": false, - # "avatar_url": "https://git.example.com/uploads/-/system/user/avatar/3/avatar.png", - # "web_url": "https://git.example.com/user.name", - # "created_at": "2020-07-16T14:43:36.801Z", - # "bio": "", - # "location": "", - # "public_email": "", - # "skype": "", - # "linkedin": "", - # "twitter": "", - # "discord": "", - # "website_url": "", - # "organization": "", - # "job_title": "", - # "pronouns": null, - # "bot": false, - # "work_information": null, - # "local_time": "10:25 AM", - # "last_sign_in_at": "2024-06-30T20:05:29.531Z", - # "confirmed_at": "2020-07-16T14:43:36.692Z", - # "last_activity_on": "2024-07-14", - # "email": "user.name@example.com", - # "theme_id": 11, - # "color_scheme_id": 2, - # "projects_limit": 100000, - # "current_sign_in_at": "2024-07-13T09:14:00.499Z", - # "identities": [ - # { - # "provider": "ldapmain", - # "extern_uid": "cn=user.name,ou=internal,ou=users,ou=org,dc=example,dc=com", - # "saml_provider_id": null - # } - # ], - # "can_create_group": true, - # "can_create_project": true, - # "two_factor_enabled": true, - # "external": false, - # "private_profile": false, - # "commit_email": "user.name@example.com", - # "shared_runners_minutes_limit": null, - # "extra_shared_runners_minutes_limit": null, - # "scim_identities": [], - # "is_admin": true, - # "note": "", - # "namespace_id": 3, - # "created_by": null, - # "email_reset_offered_at": null, - # "using_license_seat": false - # } - # ] - - # Structure on Gitea - # { - # "data": [ - # { - # "id": 1, - # "login": "user.name", - # "login_name": "", - # "source_id": 0, - # "full_name": "", - # "email": "user.name@example.com", - # "avatar_url": "http://git.example.com/avatars/a81823ace1c9fa7ab59a61ca6e2c34b0", - # "html_url": "http://git.example.com/user.name", - # "language": "en-US", - # "is_admin": true, - # "last_login": "1970-01-01T01:00:00+01:00", - # "created": "2024-07-13T11:04:57+02:00", - # "restricted": false, - # "active": true, - # "prohibit_login": false, - # "location": "", - # "website": "", - # "description": "", - # "visibility": "private", - # "followers_count": 0, - # "following_count": 0, - # "starred_repos_count": 0, - # "username": "user.name" - # } - # ], - # "ok": true - # } - compare_result = {} missing_matches = 0