@@ -1106,6 +1106,8 @@ def import_github(
1106
1106
repo_id : int ,
1107
1107
target_namespace : str ,
1108
1108
new_name : Optional [str ] = None ,
1109
+ github_hostname : Optional [str ] = None ,
1110
+ optional_stages : Optional [Dict [str , bool ]] = None ,
1109
1111
** kwargs : Any ,
1110
1112
) -> Union [Dict [str , Any ], requests .Response ]:
1111
1113
"""Import a project from Github to Gitlab (schedule the import)
@@ -1126,6 +1128,9 @@ def import_github(
1126
1128
repo_id: Github repository ID
1127
1129
target_namespace: Namespace to import repo into
1128
1130
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)
1129
1134
**kwargs: Extra options to send to the server (e.g. sudo)
1130
1135
1131
1136
Raises:
@@ -1156,9 +1161,12 @@ def import_github(
1156
1161
"personal_access_token" : personal_access_token ,
1157
1162
"repo_id" : repo_id ,
1158
1163
"target_namespace" : target_namespace ,
1164
+ "new_name" : new_name ,
1165
+ "github_hostname" : github_hostname ,
1166
+ "optional_stages" : optional_stages ,
1159
1167
}
1160
- if new_name :
1161
- data [ "new_name" ] = new_name
1168
+ data = utils . remove_none_from_dict ( data )
1169
+
1162
1170
if (
1163
1171
"timeout" not in kwargs
1164
1172
or self .gitlab .timeout is None
0 commit comments