repo_user {ghclass}R Documentation

GitHub Repository tools - user functions

Description

Usage

repo_add_team(
  repo,
  team,
  permission = c("push", "pull", "admin", "maintain", "triage"),
  team_type = c("name", "slug")
)

repo_team_permission(
  repo,
  team,
  permission = c("push", "pull", "admin", "maintain", "triage"),
  team_type = c("name", "slug")
)

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

repo_user_permission(
  repo,
  user,
  permission = c("push", "pull", "admin", "maintain", "triage")
)

repo_collaborators(repo, include_admins = TRUE)

repo_contributors(repo)

repo_remove_team(repo, team, team_type = c("name", "slug"))

repo_remove_user(repo, user)

Arguments

repo

Character. Address of repository in owner/repo format.

team

Character. Slug or name of team to add.

permission

Character. Permission to be granted to a user or team for repo, defaults to "push".

team_type

Character. Either "slug" if the team names are slugs or "name" if full team names are provided.

user

Character. One or more GitHub usernames.

include_admins

Logical. If FALSE, user names of users with Admin rights are not included, defaults to TRUE.

Details

Permissions can be set to any of the following:

Value

repo_collaborators() and repo_contributoes return a tibble.

All other functions invisibly return a list containing the results of the relevant GitHub API calls.

Examples

## Not run: 
repo = repo_create("ghclass-test", "hw1")

team_create("ghclass-test", "team_awesome")

repo_add_user(repo, "rundel")

repo_add_team(repo, "team_awesome")

repo_remove_team(repo, "team_awesome")

repo_collaborators(repo)

repo_contributors(repo)
repo_contributors("rundel/ghclass")

# Cleanup
repo_delete(repo, prompt=FALSE)

## End(Not run)


[Package ghclass version 0.3.0 Index]