create_git_prefix: Create git prefix for file paths

View source: R/utils-gather-file-paths.R

create_git_prefixR Documentation

Create git prefix for file paths

Description

Adds information about the git branch to the file path.

Usage

create_git_prefix(
  branch = gert::git_branch(),
  path = "",
  ignore_if_main = TRUE
)

Arguments

branch

String. Current branch of repo.

path

String. Folder where file should be uploaded. If an empty string is provided (default), the path argument will be ignored.

ignore_if_main

Logical. No prefixed added to files on main branch.

Value

String. Prefix for the file path.

Examples


# create_git_prefix(branch = gert::git_branch(),
# path= "example",
# ignore_if_main=TRUE)
# "refs/head/current/branch/example"


ecohealthalliance/containerTemplateUtils documentation built on March 31, 2024, 7:46 a.m.