Hello,
When trying to collect a group-id from the groupname with gl_get_group_id, the function fails if the groupname is duplicated on the gitlab instance.
gl_get_group_id(group_name = "outillage-data")
Error in `matching[1, "path_with_namespace"]`:
! Can't subset columns that don't exist.
✖ Column `path_with_namespace` doesn't exist.
Run `rlang::last_trace()` to see where the error occurred.
Message d'avis :
Unknown or uninitialised column: `path_with_namespace`.
The error occurs because the column path_with_namespace is not a column return by gitlab APIs as described here :
https://docs.gitlab.com/api/groups/#list-all-groups
for some reason, the column path_with_namespace is returned for a single group using GET /groups/:id but not returned for GET /groups
Sorry, I did not take the time to provide a reproductible example or make a fix with PR, but I can propose here a simple solution :
Changing the column path_with_namespace with full_path should do the trick on the rows :
|
matching$path_with_namespace, |
|
paste("Picking", matching[1, "path_with_namespace"], "as default") |
thanks for the great work on the package anyway,
Adam
Hello,
When trying to collect a group-id from the groupname with
gl_get_group_id, the function fails if the groupname is duplicated on the gitlab instance.The error occurs because the column
path_with_namespaceis not a column return by gitlab APIs as described here :https://docs.gitlab.com/api/groups/#list-all-groups
for some reason, the column
path_with_namespaceis returned for a single group usingGET /groups/:idbut not returned forGET /groupsSorry, I did not take the time to provide a reproductible example or make a fix with PR, but I can propose here a simple solution :
Changing the column
path_with_namespacewithfull_pathshould do the trick on the rows :gitlabr/R/groups.R
Line 103 in 15d9310
gitlabr/R/groups.R
Line 104 in 15d9310
thanks for the great work on the package anyway,
Adam