Forgejo API
POST/admin/unadopted/{owner}/{repo}

Adopt an unadopted repository

Adopts the files belonging to an unadopted repository under the specified owner and repository name. Use owner and repo to identify the unadopted files that should become a repository. A successful response contains no body.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

2 parameters
ownerstringrequired
The owner associated with the unadopted repository files.
repostringrequired
The name of the unadopted repository files to adopt.

3 status codes
204Returns no content after the unadopted files have been adopted as a repository.
403Returned when the authenticated user is not permitted to adopt the repository.
messagestringoptional
urlstringoptional
404Returned when no matching unadopted files exist for the specified `owner` and `repo`.
errorsarray<string>optional
messagestringoptional
urlstringoptional

Error handling

A 403 is returned when the authenticated user is not permitted to adopt repositories, and a 404 when the specified unadopted files cannot be found. owner and repo must identify the unadopted repository files to adopt.