Skip to content

Commit 449830f

Browse files
author
Gauvain Pocentek
authored
Merge pull request #144 from koyaan/master
Add the ability to fork to a specific namespace
2 parents dc3dcd1 + 0c1c894 commit 449830f

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

docs/gl_objects/projects.py

+3
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@
5151
fork = gl.project_forks.create({}, project_id=1)
5252
# or
5353
fork = project.forks.create({})
54+
55+
# fork to a specific namespace
56+
fork = gl.project_forks.create({'namespace': 'myteam'}, project_id=1)
5457
# end fork
5558

5659
# forkrelation

gitlab/objects.py

+1
Original file line numberDiff line numberDiff line change
@@ -1169,6 +1169,7 @@ class ProjectFork(GitlabObject):
11691169
canList = False
11701170
canGet = False
11711171
requiredUrlAttrs = ['project_id']
1172+
optionalCreateAttrs = ['namespace']
11721173

11731174

11741175
class ProjectForkManager(BaseManager):

0 commit comments

Comments
 (0)