gh_url: Produce Github URL

View source: R/utils.R

gh_urlR Documentation

Produce Github URL

Description

Useful for pointing to files on Github that live in a local clone of a repo

Usage

gh_url(path, repo, user = "petrbouchal", remote = NULL, branch = "main")

Arguments

path

path to file (the bit that goes after /tree/branch, so presumably the local path from project root)

repo

repo name; used if 'remote' is not provided.

user

Github user; used if 'remote' is not provided. Defaults to '"petrbouchal"'

remote

remote in the form of user/repo.

branch

branch. Default '"main"'

Value

character vector of same length as inputs

Inputs are recycled if not all of the same length


petrbouchal/ptrr documentation built on Oct. 10, 2024, 7:21 a.m.