delete_files: Delete files.

Description Usage Arguments Details Value

View source: R/repositories-contents.R

Description

This function deletes the specified files from a repository in GitHub. It adds a new commit for each file deleted with the specified commit message and on the specified branch. The committer and author can be set explicitly if necessary.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
delete_files(
  paths,
  messages,
  branches,
  committer,
  author,
  repo,
  token = getOption("github.token"),
  api = getOption("github.api"),
  ...
)

Arguments

paths

(character) The paths to the files in the repository.

messages

(character) The commit messages to use. If a single message is provided it is used for all commits with the file added as a suffix.

branches

(character, optional) The branches to make the commits on. If a single branch is provided all commits are made on it. If not specified the default branch for the repository is used.

committer

(list, optional) The name and email address of the committer. This needs to be specified as a named list, e.g. list(name = "Bob Smith", email = "[email protected]"). If not specified then the authenticated user is used.

author

(list, optional) The name and email address of the author. This needs to be specified as a named list, e.g. list(name = "Bob Smith", email = "[email protected]"). If not specified then the authenticated user is used.

repo

(string) The repository specified in the format: owner/repo.

token

(string, optional) The personal access token for GitHub authorisation. Default: value stored in the environment variable GITHUB_TOKEN (or GITHUB_PAT) or in the R option "github.token".

api

(string, optional) The URL of GitHub's API. Default: the value stored in the environment variable GITHUB_API or in the R option "github.api".

...

Parameters passed to gh_request().

Details

https://developer.github.com/v3/repos/contents/#delete-a-file

Value

A tibble describing the files, with the following columns (see GitHub's documentation for more details):


ChadGoymer/githapi documentation built on March 28, 2020, 11:36 p.m.