gl_repository: Access to repository functions and files in Gitlab API

Description Usage Arguments Examples

View source: R/projects_and_repos.R

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

1
2
3
4
5
6
7
8
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

1
2
3
4
5
6
## 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")

## End(Not run)

jirkalewandowski/gitlabr documentation built on May 19, 2019, 11:37 a.m.