% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/org.R, R/org_exists.R, R/org_repo_forking.R,
%   R/org_repo_search.R, R/org_repo_stats.R, R/org_repos.R,
%   R/org_team_details.R, R/org_teams.R, R/org_user_repos.R
\name{org_details}
\alias{org_details}
\alias{org_exists}
\alias{org_repo_forking}
\alias{org_repo_search}
\alias{org_repo_stats}
\alias{org_repos}
\alias{org_team_details}
\alias{org_teams}
\alias{org_user_repos}
\title{Obtain details on an organization's repos and teams}
\usage{
org_exists(org)

org_repo_forking(org)

org_repo_search(org, name, extra = "", full_repo = TRUE)

org_repo_stats(
  org,
  branch = NULL,
  filter = "",
  filter_type = "in:name",
  inc_commits = TRUE,
  inc_issues = TRUE,
  inc_prs = TRUE
)

org_repos(
  org,
  filter = NULL,
  exclude = FALSE,
  full_repo = TRUE,
  sort = c("full_name", "created", "updated", "pushed"),
  direction = c("asc", "desc"),
  type = c("all", "public", "private", "forks", "sources", "member", "internal")
)

org_team_details(org)

org_teams(org, filter = NULL, exclude = FALSE, team_type = c("name", "slug"))

org_user_repos(org, user, prefix = "", suffix = "")
}
\arguments{
\item{org}{Character. Name of the GitHub organization(s).}

\item{name}{Character. Full or partial repo name to search for within the org}

\item{extra}{Character. Any additional search qualifiers, see
\href{https://docs.github.com/en/free-pro-team@latest/github/searching-for-information-on-github/searching-for-repositories}{Searching for repositories}
for details.}

\item{full_repo}{Logical. Should the full repository address be returned (e.g. \code{owner/repo} instead of just \code{repo}). Default \code{TRUE}.}

\item{branch}{Character. The branch to use for counting commits, if \code{NULL} then each repo's default branch is used.}

\item{filter}{Character. Regular expression pattern for matching (or excluding) results}

\item{filter_type}{Character. One or more GitHub search \verb{in} qualifiers.
See \href{https://help.github.com/en/articles/searching-for-repositories}{documentation}
for more details.}

\item{inc_commits}{Logical. Include commit statistics (\code{branch}, \code{commits}, \code{last_update}). Default \code{TRUE}.}

\item{inc_issues}{Logical. Include issue statistics (\code{open_issues}, \code{closed_issues}). Default \code{TRUE}.}

\item{inc_prs}{Logical. Include pull request statistics (\code{open_prs}, \code{merged_prs}, \code{closed_prs}). Default \code{TRUE}.}

\item{exclude}{Logical. Should entries matching the regular expression be excluded or included. Default \code{FALSE}.}

\item{sort}{Character. Sorting criteria to use, can be one of "created", "updated", "pushed", or "full_name".}

\item{direction}{Character. Sorting order to use.}

\item{type}{Character. Specifies the type of repositories you want, can be one of
"all", "public", "private", "forks", "sources", "member", or "internal".}

\item{team_type}{Character. Either "slug" if the team names are slugs or "name" if full team names are provided.}

\item{user}{Character. One or more GitHub usernames.}

\item{prefix}{Character. String to prepend to each user name.}

\item{suffix}{Character. String to append to each user name.}
}
\value{
\code{org_exists()} returns a logical vector.

\code{org_teams()}, \code{org_repos}, \code{org_repo_search()}, and \code{org_user_repos()} return a character vector.

\code{org_team_details()}, \code{org_repo_stats()}, and \code{org_repo_forking()} return tibbles.
}
\description{
\itemize{
\item \code{org_exists()} - returns \code{TRUE} if the organization(s) exist on GitHub and \code{FALSE} otherwise.
\item \code{org_teams()} - returns a (filtered) vector of organization teams.
\item \code{org_team_details()} - returns a data frame of all organization teams containing identification and permission details.
\item \code{org_repos()} - returns a (filtered) vector of organization repositories.
\item \code{org_repo_search()} - search for repositories within an organization (preferred for large organizations).
\item \code{org_repo_stats()} - returns a tibble of repositories belonging to a GitHub organization along with some
basic statistics about those repositories.
\item \code{org_repo_forking()} - returns a tibble of private repositories in an organization and whether forking is enabled for each.
\item \code{org_user_repos()} - constructs a character vector of per-user repo addresses
(\verb{org/prefix<user>suffix}) aligned with \code{user}, for safely pairing with
\code{\link[=repo_add_user]{repo_add_user()}} and similar.
}
}
\section{Note}{


The order of \code{org_repos()} is not guaranteed to match the order of
\code{org_members()}, so do not rely on positional pairing of the two when
calling functions like \code{\link[=repo_add_user]{repo_add_user()}}. To pair each user with their own
repo deterministically, build the repo names from the user vector with
\code{org_user_repos()}.
}

\examples{
\dontrun{
# Org repos and teams
org_repos("ghclass-test")

org_repos("ghclass-test", filter = "hw1-")

org_teams("ghclass-test")

org_team_details("ghclass-test")
}

}
