Skip to contents

This function retrieves the DESCRIPTION file from a specified project path on GitHub, using a GitHub personal access token (PAT) for authentication. The DESCRIPTION file is downloaded temporarily and then loaded into an R object using the desc package.

Usage

download_desc_from_git(project_git_path)

Arguments

project_git_path

A character string specifying the relative GitHub path of the project for which the DESCRIPTION file should be fetched.

Value

A desc object containing the content of the DESCRIPTION file.

Details

The function constructs the URL to access the DESCRIPTION file from a specified GitHub repository and downloads it using the personal access token (PAT) stored in the environment variable GH_PAT. It temporarily saves the file and then returns it as a desc object.

Examples

if (FALSE) { # \dontrun{
# Get DESCRIPTION file for a project located at the given GitHub path
download_desc_from_git("path/to/project")
} # }