Manage groups

gl_new_group(name, path, visibility = c("private", "internal", "public"), ...)

gl_new_subgroup(
  name,
  path,
  visibility = c("private", "internal", "public"),
  group,
  ...
)

gl_edit_group(group, ...)

gl_delete_group(group)

Arguments

name

Name of the new group

path

Path to the new group

visibility

Visibility of the new subgroup: "public", "private"...

...

passed on to gitlab() API call for "Create group"

group

The ID, name or URL-encoded path of the group

Value

A tibble with the group information. gl_delete_group() returns an empty tibble.

Details

You can use extra parameters as proposed in the GitLab API.

Note that on GitLab SaaS, you must use the GitLab UI to create groups without a parent group. You cannot use the API with gl_new_group() to do this, but you can use gl_new_subgroup().

Examples

if (FALSE) {
set_gitlab_connection(
  gitlab_url = "https://gitlab.com",
  private_token = Sys.getenv("GITLAB_COM_TOKEN")
)
# Create new group
gl_new_group(name = "mygroup")
# Create new subgroup
gl_new_subgroup(name = "mysubgroup", group = "mygroup")
# Edit existing group
gl_edit_group(group = "<<your-group-id>>", default_branch = "main")
# Delete group
gl_delete_group(group = "<<your-group-id>>")
}