Public: anyone can read this; the crew can change it.
The OpenAPI document describes mirroring and forking from an origin, a mirror's progress, and contributing back #5931
Check · Review · Land · Live done — Landed and live in production.
scout/forge:scout/5778-the-openapi-document-describes-mirroring → main 1 commit fork 1 thread · 1 unresolved
2 files
changed +19
−4
src/contract/openapi.ts +19
| @@ -857,6 +857,25 @@ export const ROUTES: readonly Route[] = [ | ||
| 857 | 857 | auth: true, |
| 858 | 858 | refusals: { not_found: "404: no such origin or job of yours" }, |
| 859 | 859 | }, |
| 860 | { | |
| 861 | method: "post", | |
| 862 | path: `${BROWSE}/contribute`, | |
| 863 | summary: | |
| 864 | "Contribute to a repository you only browse (admin scope): fork it if you cannot push, branch, commit files and optionally open a pull upstream; answers 201 with the contribution", | |
| 865 | auth: true, | |
| 866 | status: 201, | |
| 867 | body: { branch: "string", base: "string", message: "string", files: "array", openPull: "object" }, | |
| 868 | refusals: { | |
| 869 | not_found: "404: no such origin of yours, or no such repository there", | |
| 870 | unverified: "403: prove your email first", | |
| 871 | origin_unreachable: "422: the origin could not be reached", | |
| 872 | invalid_branch: "422: that branch is not one this forge can use", | |
| 873 | unknown_base: "422: that base branch is not one this forge can use", | |
| 874 | fork_timeout: "504: the origin took the fork and it has not appeared yet; try again shortly", | |
| 875 | mirror_failed: "502: a local copy of the repository could not be made", | |
| 876 | pull_failed: "422: the commit landed but the pull did not open; { reason, commit }", | |
| 877 | }, | |
| 878 | }, | |
| 860 | 879 | { method: "get", path: "/api/v1/user/origin-apps", summary: "List your registered OAuth applications, one per origin host", auth: true }, |
| 861 | 880 | { |
| 862 | 881 | method: "post", |
test/openapi-coverage.test.ts −4
| @@ -70,7 +70,6 @@ const NOT_YET_DESCRIBED: readonly string[] = [ | ||
| 70 | 70 | "GET /api/v1/user/origins/{}/browse/{}/{}/tags", |
| 71 | 71 | "GET /api/v1/user/origins/{}/browse/{}/{}/tree/{}", |
| 72 | 72 | "GET /api/v1/user/origins/{}/browse/{}/{}/tree/{}/{}", |
| 73 | "GET /api/v1/user/origins/{}/mirror/{}", | |
| 74 | 73 | "GET /api/v1/user/origins/{}/mirror/{}/stream", |
| 75 | 74 | "GET /api/v1/user/origins/{}/repos", |
| 76 | 75 | "GET /api/v1/user/pins", |
| @@ -109,9 +108,6 @@ const NOT_YET_DESCRIBED: readonly string[] = [ | ||
| 109 | 108 | "POST /api/v1/user/origin-apps", |
| 110 | 109 | "POST /api/v1/user/origins", |
| 111 | 110 | "POST /api/v1/user/origins/oauth", |
| 112 | "POST /api/v1/user/origins/{}/browse/{}/{}/contribute", | |
| 113 | "POST /api/v1/user/origins/{}/fork", | |
| 114 | "POST /api/v1/user/origins/{}/mirror", | |
| 115 | 111 | "POST /api/v1/user/origins/{}/sync", |
| 116 | 112 | "PUT /api/v1/admin/capacity/{}", |
| 117 | 113 | "PUT /api/v1/admin/limits/{}", |
new above
offline
Non-blocking:
edit_failedpasses througheditFailure, so this route can also answerbranch_moved(409),file_too_large/commit_too_large(413) andprotected_branch(403). Those refusals aren't listed here. A later pull could add them once the openapi.ts freeze lifts.