Skip to content

Commit ce4bc0d

Browse files
nejchJohnVillalovos
authored andcommitted
fix(objects): rename confusing to_project_id argument
BREAKING CHANGE: rename confusing `to_project_id` argument in transfer_project to `project_id` (`--project-id` in CLI). This is used for the source project, not for the target namespace.
1 parent 3f320af commit ce4bc0d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

gitlab/v4/objects/groups.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ class Group(SaveMixin, ObjectDeleteMixin, RESTObject):
7272
variables: GroupVariableManager
7373
wikis: GroupWikiManager
7474

75-
@cli.register_custom_action("Group", ("to_project_id",))
75+
@cli.register_custom_action("Group", ("project_id",))
7676
@exc.on_http_error(exc.GitlabTransferProjectError)
77-
def transfer_project(self, to_project_id, **kwargs):
77+
def transfer_project(self, project_id, **kwargs):
7878
"""Transfer a project to this group.
7979
8080
Args:
@@ -85,7 +85,7 @@ def transfer_project(self, to_project_id, **kwargs):
8585
GitlabAuthenticationError: If authentication is not correct
8686
GitlabTransferProjectError: If the project could not be transfered
8787
"""
88-
path = "/groups/%s/projects/%s" % (self.id, to_project_id)
88+
path = "/groups/%s/projects/%s" % (self.id, project_id)
8989
self.manager.gitlab.http_post(path, **kwargs)
9090

9191
@cli.register_custom_action("Group", ("scope", "search"))

0 commit comments

Comments
 (0)