diff options
author | Nejc Habjan <hab.nejc@gmail.com> | 2021-09-11 17:58:48 +0200 |
---|---|---|
committer | Nejc Habjan <hab.nejc@gmail.com> | 2021-09-11 17:58:48 +0200 |
commit | ab1420c5e0061476d7a3c997a34196fab307795d (patch) | |
tree | 9dd3e381dd6f5138c49df6c608547dbd9f8f321f | |
parent | 3f320af347df05bba9c4d0d3bdb714f7b0f7b9bf (diff) | |
download | gitlab-fix/group-transfer-project-arg.tar.gz |
fix(objects): rename confusing `to_project_id` argumentfix/group-transfer-project-arg
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.
-rw-r--r-- | gitlab/v4/objects/groups.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gitlab/v4/objects/groups.py b/gitlab/v4/objects/groups.py index 7de4f84..b4df4a9 100644 --- a/gitlab/v4/objects/groups.py +++ b/gitlab/v4/objects/groups.py @@ -72,9 +72,9 @@ class Group(SaveMixin, ObjectDeleteMixin, RESTObject): variables: GroupVariableManager wikis: GroupWikiManager - @cli.register_custom_action("Group", ("to_project_id",)) + @cli.register_custom_action("Group", ("project_id",)) @exc.on_http_error(exc.GitlabTransferProjectError) - def transfer_project(self, to_project_id, **kwargs): + def transfer_project(self, project_id, **kwargs): """Transfer a project to this group. Args: @@ -85,7 +85,7 @@ class Group(SaveMixin, ObjectDeleteMixin, RESTObject): GitlabAuthenticationError: If authentication is not correct GitlabTransferProjectError: If the project could not be transfered """ - path = "/groups/%s/projects/%s" % (self.id, to_project_id) + path = "/groups/%s/projects/%s" % (self.id, project_id) self.manager.gitlab.http_post(path, **kwargs) @cli.register_custom_action("Group", ("scope", "search")) |