Skip to main content

repos

Overview

Namerepos
TypeResource
Idgithub.repos.repos

Fields

NameDatatypeDescription
idinteger
namestring
descriptionstring
merges_urlstring
languagestring
created_atstring
forks_countinteger
clone_urlstring
subscribers_countinteger
is_templateboolean
has_discussionsboolean
statuses_urlstring
labels_urlstring
issue_events_urlstring
milestones_urlstring
subscribers_urlstring
has_projectsboolean
forksinteger
disabledboolean
has_pagesboolean
branches_urlstring
compare_urlstring
default_branchstring
releases_urlstring
updated_atstring
html_urlstring
node_idstring
ownerobjectA GitHub user.
web_commit_signoff_requiredboolean
languages_urlstring
watchersinteger
visibilitystring
has_wikiboolean
subscription_urlstring
pulls_urlstring
watchers_countinteger
privateboolean
teams_urlstring
role_namestring
has_downloadsboolean
full_namestring
code_of_conductobjectCode Of Conduct
downloads_urlstring
collaborators_urlstring
contributors_urlstring
archive_urlstring
open_issuesinteger
delete_branch_on_mergeboolean
open_issues_countinteger
forkboolean
stargazers_countinteger
stargazers_urlstring
deployments_urlstring
comments_urlstring
allow_forkingboolean
assignees_urlstring
mirror_urlstring
licenseobject
issue_comment_urlstring
trees_urlstring
commits_urlstring
git_commits_urlstring
notifications_urlstring
git_refs_urlstring
git_tags_urlstring
events_urlstring
ssh_urlstring
homepagestring
svn_urlstring
sizeintegerThe size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0.
archivedboolean
blobs_urlstring
contents_urlstring
issues_urlstring
git_urlstring
tags_urlstring
has_issuesboolean
temp_clone_tokenstring
permissionsobject
pushed_atstring
urlstring
topicsarray
network_countinteger
security_and_analysisobject
keys_urlstring
hooks_urlstring
forks_urlstring

Methods

NameAccessible byRequired ParamsDescription
list_for_orgSELECTorgLists repositories for the specified organization.

Note: In order to see the security_and_analysis block for a repository you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "Managing security managers in your organization."
list_for_userSELECTusernameLists public repositories for the specified user. Note: For GitHub AE, this endpoint will list internal repositories for the specified user.
list_publicSELECTLists all public repositories in the order that they were created.

Note:
- For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise.
- Pagination is powered exclusively by the since parameter. Use the Link header to get the URL for the next page of repositories.
create_in_orgINSERTorg, data__nameCreates a new repository in the specified organization. The authenticated user must be a member of the organization.

OAuth scope requirements

When using OAuth, authorizations must include:

public_repo scope or repo scope to create a public repository. Note: For GitHub AE, use repo scope to create an internal repository.
repo scope to create a private repository
deleteDELETEowner, repoDeleting a repository requires admin access. If OAuth is used, the delete_repo scope is required.

If an organization owner has configured the organization to prevent members from deleting organization-owned
repositories, you will get a 403 Forbidden response.
check_vulnerability_alertsEXECowner, repoShows whether dependency alerts are enabled or disabled for a repository. The authenticated user must have admin read access to the repository. For more information, see "About security alerts for vulnerable dependencies".
codeowners_errorsEXECowner, repoList any syntax errors that are detected in the CODEOWNERS
file.

For more information about the correct CODEOWNERS syntax,
see "About code owners."
create_dispatch_eventEXECowner, repo, data__event_typeYou can use this endpoint to trigger a webhook event called repository_dispatch when you want activity that happens outside of GitHub to trigger a GitHub Actions workflow or GitHub App webhook. You must configure your GitHub Actions workflow or GitHub App to run when the repository_dispatch event occurs. For an example repository_dispatch webhook payload, see "RepositoryDispatchEvent."

The client_payload parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the client_payload can include a message that a user would like to send using a GitHub Actions workflow. Or the client_payload can be used as a test to debug your workflow.

This endpoint requires write access to the repository by providing either:

- Personal access tokens with repo scope. For more information, see "Creating a personal access token for the command line" in the GitHub Help documentation.
- GitHub Apps with both metadata:read and contents:read&write permissions.

This input example shows how you can use the client_payload as a test to debug your workflow.
create_using_templateEXECtemplate_owner, template_repo, data__nameCreates a new repository using a repository template. Use the template_owner and template_repo route parameters to specify the repository to use as the template. If the repository is not public, the authenticated user must own or be a member of an organization that owns the repository. To check if a repository is available to use as a template, get the repository's information using the Get a repository endpoint and check that the is_template key is true.

OAuth scope requirements

When using OAuth, authorizations must include:

public_repo scope or repo scope to create a public repository. Note: For GitHub AE, use repo scope to create an internal repository.
repo scope to create a private repository
disable_private_vulnerability_reportingEXECowner, repoDisables private vulnerability reporting for a repository. The authenticated user must have admin access to the repository. For more information, see "Privately reporting a security vulnerability".
disable_vulnerability_alertsEXECowner, repoDisables dependency alerts and the dependency graph for a repository.
The authenticated user must have admin access to the repository. For more information,
see "About security alerts for vulnerable dependencies".
enable_private_vulnerability_reportingEXECowner, repoEnables private vulnerability reporting for a repository. The authenticated user must have admin access to the repository. For more information, see "Privately reporting a security vulnerability."
enable_vulnerability_alertsEXECowner, repoEnables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "About security alerts for vulnerable dependencies".
list_languagesEXECowner, repoLists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language.
transferEXECowner, repo, data__new_ownerA transfer request will need to be accepted by the new owner when transferring a personal repository to another user. The response will contain the original owner, and the transfer will continue asynchronously. For more details on the requirements to transfer personal and organization-owned repositories, see about repository transfers.
You must use a personal access token (classic) or an OAuth token for this endpoint. An installation access token or a fine-grained personal access token cannot be used because they are only granted access to a single account.
updateEXECowner, repoNote: To edit a repository's topics, use the Replace all repository topics endpoint.