Archiving repositories

As part of the release of archiving repositories, we've made changes to expose this feature to developers.

Note that archived repositories are read-only to everyone (including repository owners). This includes anyone using the REST or GraphQL APIs to edit the repository, issues, pull requests, labels, milestones, projects, wiki, releases, commits, tags, branches, reactions, or comments. No one (including repository owners) can use the REST or GraphQL APIs to create new issues, pull requests, or comments on an archived repository.

To our GitHub Enterprise customers: archiving repositories will be available in the next Enterprise release (2.12), but not in the current version or older versions.

REST API changes

  • Repository responses now contain an archived field that is true or false depending on whether the repository was archived.
  • You can use the REST API to archive repositories by passing the "archived": true parameter to the Update a repository at PATCH /repos/:owner/:repo.

GraphQL API changes

  • Repository, RepositoryInfo, and RepositoryInvitationRepository objects now contain an isArchived field that is true or false depending on whether the repository was archived.

Webhook changes

  • RepositoryEvent webhooks are now emitted when a repository is archived or unarchived.

Search changes

Happy archiving! If you have any questions or feedback, please let us know!