Add a user to a repository

repo_add_user(repo, user, permission = c("push", "pull", "admin"))

Arguments

repo

Character. Address of repository in "owner/name" format.

user

Character. One or more GitHub usernames.

permission

Character. Permission to be granted to team for repo ("push", "pull", or "admin"), defaults to "push".

  • pull - can pull, but not push to or administer this repository.

  • push - can pull and push, but not administer this repository.

  • admin - can pull, push and administer this repository.

Examples

if (FALSE) { repo_add_user("ghclass-test/hw1-team1", c("user01", "user02")) ## Adding users to their individual repositories user = c("user01", "user02") repo_add_user(paste0("ghclass-test/hw2-", user), user) }