pb_delete: Delete an asset attached to a release

Description Usage Arguments Value Examples

View source: R/pb_delete.R

Description

Delete an asset attached to a release

Usage

1
2
3
4
5
6
pb_delete(
  file = NULL,
  repo = guess_repo(),
  tag = "latest",
  .token = get_token()
)

Arguments

file

file(s) to be deleted from the release. If NULL (default when argument is omitted), function will delete all attachments to the release. delete

repo

Repository name in format "owner/repo". Will guess the current repo if not specified.

tag

tag for the GitHub release to which this data should be attached.

.token

GitHub authentication token. Typically set from an environmental variable, e.g. in a .Renviron file or with Sys.setenv(GITHUB_TOKEN = "xxxxx"), which helps prevent accidental disclosure of a secret token when sharing scripts.

Value

TRUE (invisibly) if a file is found and deleted. Otherwise, returns NULL (invisibly) if no file matching the name was found.

Examples

1
2
3
4
5
6
7
8
readr::write_tsv(mtcars, "mtcars.tsv.gz")
## Upload
pb_upload("mtcars.tsv.gz",
          repo = "cboettig/piggyback-tests",
           overwrite = TRUE)
pb_delete("mtcars.tsv.gz",
          repo = "cboettig/piggyback-tests",
          tag = "v0.0.1")

piggyback documentation built on Feb. 25, 2020, 5:08 p.m.