R/build-headers.R

Defines functions build_headers

# Build request headers
build_headers <- function() {

  hdrs <- c(Accept="application/vnd.github.cryptographer-preview")

  gh_pat <- Sys.getenv("GITHUB_PAT", "")
  if (gh_pat != "") hdrs <- c(hdrs, Authorization = sprintf("token %s", gh_pat))

  hdrs

}
ropenscilabs/notary documentation built on May 20, 2022, 11:58 a.m.