if (FALSE) { # interactive()
# Get content from default branch
file_info <- file_content("username/repository", "path/to/file.R")
if (!is.null(file_info)) {
# Access the content and SHA
content <- file_info$content
sha <- file_info$sha
}
# Get content from specific branch
file_info <- file_content("username/repository", "path/to/file.R", ref = "develop")
# Suppress warnings
file_info <- file_content("username/repository", "path/to/file.R")
}
Run the code above in your browser using DataLab