gl_push_file: Upload a file to a gitlab repository

Description Usage Arguments Value Examples

Description

If the file already exists, it is updated/overwritten by default

Usage

1
2
gl_push_file(project, file_path, content, commit_message,
  branch = "master", overwrite = TRUE, ...)

Arguments

project

Project name or id

file_path

path where to store file in gl_repository

content

file content (text)

commit_message

Message to use for commit with new/updated file

branch

name of branch where to append newly generated commit with new/updated file

overwrite

whether to overwrite files that already exist

...

passed on to gitlab

Value

returns a data_frame with changed branch and path (0 rows if nothing was changed, since overwrite is FALSE)

Examples

1
2
3
4
5
6
7
## Not run: 
my_project <- gl_project_connection(project = "example-project", ...) ## fill in login parameters
my_project(gl_push_file, "data/test_data.csv",
           content = readLines("test-data.csv"),
           commit_message = "New test data")

## End(Not run)

gitlabr documentation built on May 1, 2019, 6:39 p.m.