Manage projects

gl_new_project(name, path, ...)

gl_edit_project(project, ...)

gl_delete_project(project)

Arguments

name

of the new project. The name of the new project. Equals path if not provided

path

to the new project if name is not provided. Repository name for new project. Generated based on name if not provided (generated as lowercase with dashes).

...

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

project

id (preferred way) or name of the project. Not repository name.

Value

A tibble with the project information. gl_delete_project() returns an empty tibble.

Details

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

  • namespace_id: Namespace for the new project (defaults to the current user’s namespace).

Examples

if (FALSE) {
set_gitlab_connection(
  gitlab_url = "https://gitlab.com",
  private_token = Sys.getenv("GITLAB_COM_TOKEN")
)
# Create new project
gl_new_project(name = "toto")
# Edit existing project
gl_edit_project(project = "<<your-project-id>>", default_branch = "main")
# Delete project
gl_delete_project(project = "<<your-project-id>>")
}