Learn R Programming

ghclass (version 0.2.0)

team_members: Tools for inviting, removing, and managing members of an organization team

Description

  • team_invite - add members to team(s).

  • team_remove - remove members from team(s).

  • team_members - returns a data frame of team members.

  • team_pending - returns a data frame of pending team members.

  • team_repos - returns a data frame of teams and their repos.

Usage

team_invite(org, user, team, team_type = c("name", "slug"))

team_members(org, team = org_teams(org), team_type = c("name", "slug"))

team_pending(org, team = org_teams(org), team_type = c("name", "slug"))

team_remove(org, user, team, team_type = c("name", "slug"))

team_repos(org, team = org_teams(org), team_type = c("name", "slug"))

Arguments

org

Character. Name of the GitHub organization.

user

Character. One or more GitHub users to invite.

team

Character. Name of teams.

team_type

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

Examples

Run this code
# NOT RUN {
team_create("ghclass-test",c("hw1-team01","hw1-team02"))

team_invite("ghclass-test", user = "rundel", team = c("hw1-team01", "hw1-team02", "missing_team"))

team_remove("ghclass-test", user = "rundel", team = c("hw1-team01", "missing_team"))

team_members("ghclass-test", org_teams("ghclass-test", "hw1-"))

team_pending("ghclass-test", org_teams("ghclass-test", "hw1-"))

# Add team repo
repo_create("ghclass-test", name = "hw1-team02")
repo_add_team("ghclass-test/hw1-team02", team = "hw1-team02")

team_repos("ghclass-test", org_teams("ghclass-test", "hw1-"))


# Cleanup
repo_delete("ghclass-test/hw1-team02", prompt = FALSE)
team_delete("ghclass-test", org_teams("ghclass-test", "hw1-"), prompt = FALSE)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab