• org_invite - invites user(s) to a GitHub organization.

  • org_remove - remove user(s) from an organization (and all teams within that organization).

  • org_members - returns a (filtered) vector of organization members.

  • org_pending - returns a (filtered) vector of pending organization members.

  • org_admins - returns a vector of repository administrators. In the case of a non-organization owner (e.g. a user account) returns the owner's login.

org_admins(org)

org_invite(org, user)

org_members(org, filter = NULL, exclude = FALSE, include_admins = TRUE)

org_pending(org, filter = NULL, exclude = FALSE)

org_remove(org, user, prompt = TRUE)

Arguments

org

Character. Name of the GitHub organization(s).

user

Character. GitHub username(s).

filter

Character. Regular expression pattern for matching (or excluding) results

exclude

Logical. Should entries matching the regular expression be excluded or included.

include_admins

Logical. Should admin users be included in the results.

prompt

Logical. Prompt before removing member from organization.

Examples

# \dontrun{ # Org Details org_admins("ghclass-test")
#> [1] "mine-cetinkaya-rundel" "rundel" "thereseanders"
org_admins("rundel") # User, not an organization
#> [1] "rundel"
# Org Membership - Invite, Status, and Remove students = c("ghclass-anya", "ghclass-bruno", "ghclass-celine", "ghclass-diego", "ghclass-elijah","ghclass-francis") org_invite("ghclass-test", students)
#> Invited user 'ghclass-anya' to org 'ghclass-test'.
#> Invited user 'ghclass-bruno' to org 'ghclass-test'.
#> Invited user 'ghclass-celine' to org 'ghclass-test'.
#> Invited user 'ghclass-diego' to org 'ghclass-test'.
#> Invited user 'ghclass-elijah' to org 'ghclass-test'.
#> Invited user 'ghclass-francis' to org 'ghclass-test'.
org_members("ghclass-test")
#> [1] "mine-cetinkaya-rundel" "rundel" "thereseanders"
org_pending("ghclass-test")
#> [1] "ghclass-anya" "ghclass-bruno" "ghclass-diego" "ghclass-elijah" #> [5] "ghclass-francis" "ghclass-celine"
org_remove("ghclass-test", students, prompt = FALSE)
#> Removed pending user 'ghclass-anya' from org 'ghclass-test'.
#> Removed pending user 'ghclass-bruno' from org 'ghclass-test'.
#> Removed pending user 'ghclass-celine' from org 'ghclass-test'.
#> Removed pending user 'ghclass-diego' from org 'ghclass-test'.
#> Removed pending user 'ghclass-elijah' from org 'ghclass-test'.
#> Removed pending user 'ghclass-francis' from org 'ghclass-test'.
org_pending("ghclass-test")
#> character(0)
# }