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
archivedfield that istrueorfalsedepending on whether the repository was archived. - You can use the REST API to archive repositories by passing the
"archived": trueparameter to the Edit endpoint atPATCH /repos/:owner/:repo.
GraphQL API changes
-
Repository,RepositoryInfo, andRepositoryInvitationRepositoryobjects now contain anisArchivedfield that istrueorfalsedepending on whether the repository was archived.
Webhook changes
-
RepositoryEventwebhooks are now emitted when a repository isarchivedorunarchived.
Search changes
- You can search for archived repositories and their issues and pull requests using the
archived:truesearch filter.
Happy archiving! If you have any questions or feedback, please let us know!