Skip to content

Commit 2ac42d6

Browse files
author
Gauvain Pocentek
committed
Merge branch 'master' of github.com:gpocentek/python-gitlab
2 parents 90ad2de + 449830f commit 2ac42d6

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

docs/gl_objects/projects.py

Lines changed: 3 additions & 0 deletions
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

Lines changed: 1 addition & 0 deletions
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)