Learn R Programming

ghclass (version 0.1.0)

repo_modify_file: Modify a file within a repository

Description

Modify a file within a repository

Usage

repo_modify_file(
  repo,
  path,
  pattern,
  content,
  method = c("replace", "before", "after"),
  all = FALSE,
  message = "Modified content",
  branch = "master"
)

Arguments

repo

Character. Address of repository in owner/name format.

path

Character. File's path within the repository.

pattern

Character. Regex pattern.

content

Character. Content to be added to the file.

method

Character. Should the content replace the matched pattern or be inserted before or after the match.

all

Character. Should all instances of the pattern be modified (TRUE) or just the first (FALSE).

message

Character. Commit message.

branch

Character. Name of branch to use, defaults to "master".