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 istrue
orfalse
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 atPATCH /repos/:owner/:repo
.
GraphQL API changes
-
Repository
,RepositoryInfo
, andRepositoryInvitationRepository
objects now contain anisArchived
field that istrue
orfalse
depending on whether the repository was archived.
Webhook changes
-
RepositoryEvent
webhooks are now emitted when a repository isarchived
orunarchived
.
Search changes
- You can search for archived repositories and their issues and pull requests using the
archived:true
search filter.
Happy archiving! If you have any questions or feedback, please let us know!