Skip to main content

repos

Overview

Namerepos
TypeResource
Idgithub.teams.repos

Fields

NameDatatypeDescription
idinteger
namestring
descriptionstring
subscribers_urlstring
git_urlstring
branches_urlstring
topicsarray
has_downloadsboolean
keys_urlstring
privateboolean
assignees_urlstring
sizeinteger
notifications_urlstring
forksinteger
network_countinteger
allow_forkingboolean
clone_urlstring
contributors_urlstring
deployments_urlstring
watchersinteger
contents_urlstring
languages_urlstring
mirror_urlstring
has_wikiboolean
pushed_atstring
issue_comment_urlstring
archivedboolean
stargazers_urlstring
git_refs_urlstring
node_idstring
collaborators_urlstring
merges_urlstring
has_projectsboolean
open_issuesinteger
git_commits_urlstring
is_templateboolean
ownerobjectSimple User
ssh_urlstring
issue_events_urlstring
temp_clone_tokenstring
updated_atstring
html_urlstring
downloads_urlstring
forks_countinteger
forks_urlstring
compare_urlstring
delete_branch_on_mergeboolean
teams_urlstring
has_issuesboolean
watchers_countinteger
hooks_urlstring
full_namestring
forkboolean
code_of_conductobjectCode Of Conduct
visibilitystring
template_repositoryobjectA git repository
statuses_urlstring
archive_urlstring
permissionsobject
pulls_urlstring
disabledboolean
milestones_urlstring
labels_urlstring
languagestring
stargazers_countinteger
licenseobject
homepagestring
blobs_urlstring
issues_urlstring
default_branchstring
releases_urlstring
trees_urlstring
svn_urlstring
urlstring
has_pagesboolean
git_tags_urlstring
role_namestring
created_atstring
subscribers_countinteger
events_urlstring
commits_urlstring
open_issues_countinteger
subscription_urlstring
comments_urlstring
tags_urlstring

Methods

NameAccessible byRequired ParamsDescription
list_repos_in_orgSELECTorg, team_slugLists a team's repositories visible to the authenticated user.

Note: You can also specify a team by org_id and team_id using the route GET /organizations/{org_id}/team/{team_id}/repos.
add_or_update_repo_permissions_in_orgINSERTorg, owner, repo, team_slugTo add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a 422 Unprocessable Entity status if you attempt to add a repository to a team that is not owned by the organization. Note that, if you choose not to pass any parameters, you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see "HTTP verbs."

Note: You can also specify a team by org_id and team_id using the route PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}.

For more information about the permission levels, see "Repository permission levels for an organization".
remove_repo_in_orgDELETEorg, owner, repo, team_slugIf the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. This does not delete the repository, it just removes it from the team.

Note: You can also specify a team by org_id and team_id using the route DELETE /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}.
check_permissions_for_repo_in_orgEXECorg, owner, repo, team_slugChecks whether a team has admin, push, maintain, triage, or pull permission for a repository. Repositories inherited through a parent team will also be checked.

You can also get information about the specified repository, including what permissions the team grants on it, by passing the following custom media type via the application/vnd.github.v3.repository+json accept header.

If a team doesn't have permission for the repository, you will receive a 404 Not Found response status.

Note: You can also specify a team by org_id and team_id using the route GET /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}.