You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I agree --to-project-id should be changed, that's strange. But for the group ID, this is picked up from the parent command, as you use the group object, so it is a little more consistent with other subcommands if we leave it as is IMO.
Perhaps a less confusing option here would be to use the subcommand of the project object, which is the first thing that comes to mind when I think about transferring projects actually. This has hopefully clearer arguments (the --to-namespace arg is almost exactly what you ask for but also includes personal namespaces):
But maybe we can more closely follow the params in the API (project_id). Sometimes GitLab endpoints are kind of duplicated like that. Neat little idea for the project btw, I've always thought creating a toolkit-style higher-level wrapper (in python though) would be a good idea for functions/commands that we all reinvent everywhere when using python-gitlab.
Activity
nejch commentedon Jun 23, 2021
I agree
--to-project-idshould be changed, that's strange. But for the group ID, this is picked up from the parent command, as you use thegroupobject, so it is a little more consistent with other subcommands if we leave it as is IMO.Perhaps a less confusing option here would be to use the subcommand of the
projectobject, which is the first thing that comes to mind when I think about transferring projects actually. This has hopefully clearer arguments (the--to-namespacearg is almost exactly what you ask for but also includes personal namespaces):https://python-gitlab.readthedocs.io/en/stable/cli-objects.html#gitlab-project-transfer-project
[-]Transfer project is confusing[/-][+]`group transfer-project` is confusing[/+]Use the more natural project semantics for transfer
chris-peterson commentedon Jun 23, 2021
Makes sense to leave
--idalone since there's strong precedent for it being scoped to the parent command.You were right that switching to the
projectvariant is much cleaner.Perhaps the
groupCLI option should just be deprecated rather than renaming anything.nejch commentedon Jun 23, 2021
Great! I think we can keep the group one as otherwise people will request it since it's available in the API:
https://docs.gitlab.com/ee/api/groups.html#transfer-project-to-group
But maybe we can more closely follow the params in the API (
project_id). Sometimes GitLab endpoints are kind of duplicated like that. Neat little idea for the project btw, I've always thought creating a toolkit-style higher-level wrapper (in python though) would be a good idea for functions/commands that we all reinvent everywhere when using python-gitlab.