@@ -1106,6 +1106,8 @@ def import_github(
11061106        repo_id : int ,
11071107        target_namespace : str ,
11081108        new_name : Optional [str ] =  None ,
1109+         github_hostname : Optional [str ] =  None ,
1110+         optional_stages : Optional [Dict [str , bool ]] =  None ,
11091111        ** kwargs : Any ,
11101112    ) ->  Union [Dict [str , Any ], requests .Response ]:
11111113        """Import a project from Github to Gitlab (schedule the import) 
@@ -1126,6 +1128,9 @@ def import_github(
11261128            repo_id: Github repository ID 
11271129            target_namespace: Namespace to import repo into 
11281130            new_name: New repo name (Optional) 
1131+             github_hostname: Custom GitHub Enterprise hostname. 
1132+                 Do not set for GitHub.com. (Optional) 
1133+             optional_stages: Additional items to import. (Optional) 
11291134            **kwargs: Extra options to send to the server (e.g. sudo) 
11301135
11311136        Raises: 
@@ -1156,9 +1161,12 @@ def import_github(
11561161            "personal_access_token" : personal_access_token ,
11571162            "repo_id" : repo_id ,
11581163            "target_namespace" : target_namespace ,
1164+             "new_name" : new_name ,
1165+             "github_hostname" : github_hostname ,
1166+             "optional_stages" : optional_stages ,
11591167        }
1160-         if   new_name : 
1161-              data [ "new_name" ]  =   new_name 
1168+         data   =   utils . remove_none_from_dict ( data ) 
1169+ 
11621170        if  (
11631171            "timeout"  not  in kwargs 
11641172            or  self .gitlab .timeout  is  None 
0 commit comments