if (FALSE) {
# Set the connection for the session
set_gitlab_connection("https://gitlab.com", private_token = Sys.getenv("GITLAB_COM_TOKEN"))
# Get list of projects
gl_list_projects(max_page = 1)
# Unset the connection for the session
unset_gitlab_connection()
# Set connection for a specific project
my_project <- gl_project_connection(
gitlab_url = "https://gitlab.com",
project = 1234,
private_token = Sys.getenv("GITLAB_COM_TOKEN")
)
# List files of a project
my_project_list_files <- my_project(gl_list_files, max_page = 1)
}
Run the code above in your browser using DataLab