Learn R Programming

gitlabr (version 1.1.6)

gl_repository: Access to repository functions and files in Gitlab API

Description

Access to repository functions and files in Gitlab API

For gl_file_exists dots are passed on to gl_list_files and gitlab API call

Get a file from a gitlab repository

Usage

gl_repository(req = c("tree"), project, ...)

gl_list_files(...)

gl_file_exists(project, file_path, ref, ...)

gl_get_file(project, file_path, ref = "master", to_char = TRUE, force_api_v3 = FALSE, ...)

Arguments

req

request to perform on repository (everything after '/repository/' in gitlab API, as vector or part of URL)

project

name or id of project (not repository!)

...

passed on to gitlab API call

file_path

path to file

ref

name of ref (commit branch or tag)

to_char

flag if output should be converted to char; otherwise it is of class raw

force_api_v3

a switch to force deprecated gitlab API v3 behavior. See details section "API version" of gl_connection

Examples

Run this code
# NOT RUN {
my_project <- gl_project_connection(project = "example-project", ...) ## fill in login parameters
my_project(gl_list_files)
my_project(gl_get_file, "data.csv")
# }

Run the code above in your browser using DataLab