Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitce84f2e

Browse files
nejchJohnVillalovos
authored andcommitted
feat(projects): allow importing additional items from GitHub
1 parent511764d commitce84f2e

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

‎gitlab/v4/objects/projects.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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-
ifnew_name:
1161-
data["new_name"]=new_name
1168+
data=utils.remove_none_from_dict(data)
1169+
11621170
if (
11631171
"timeout"notinkwargs
11641172
orself.gitlab.timeoutisNone

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp