gitoria
All repositories: gitoria
23.6 KB
// lib/api.hl — THE FUNCTION ROUTES (project.hl wires them): thin wrappers — check the request and the session, call the// topic, answer. The plumbing (JSON / Markdown / plain answers, redirects, the ssh guard, `?next=`) is lib/api-helpers.hl.// /api/repos, /api/repos/:slug the public reads (repos.hl; Accept: text/markdown → the Markdown read view)// /login/callback the login button's return (users.hl)// /settings/connect, /settings/connected connecting a repo to a tickets project (tickets.hl)// /api/apps/token an app trades its key for a one-hour token (app-tokens.hl, gitoria#42)// /settings/apps/connect, /settings/apps/confirm, /api/apps/exchange connecting an app to a repo (apps.hl, gitoria#41)// /api/pulls… an app reads PRs, posts reviews with inline threads, replies, resolves, comments (reviews.hl, gitoria#44)// /__git/keys, /__git/access what the sshd container asks (sshkeys.hl, repos.hl)// (The git protocol's routes are lib/transport.hl gitTransport.)// A route that WRITES THE SESSION gets the request and the framework's session store BY REFERENCE (`&req`, `&sessions`,// from project.hl): copied into a second call, the session inside `req` would be a copy too and the write would be lost.import { userOfToken } from './tokens.hl'import { Response } from 'hl:http1'import { randomBytes } from 'hl:crypto'import { NL, px, slugOfHost } from './util.hl'import { userOfLoginCode } from './users.hl'import { createRepoFromInput, repoRows, repoRow, repoBySlug, repoFor, orgFor, ownsRepo, mayPush, mayRead } from './repos.hl'import { fullNameError, repoDocument, listDocument } from './repos-helpers.hl'import { forwardOf } from './forwards.hl'import { userIdOfSession } from './users.hl'import { connectHref, finishConnect } from './tickets.hl'import { keyLine } from './sshkeys.hl'import { urlAllowed, withQuery, formFields } from './apps-helpers.hl'import { nameError, makeCode, exchangeCode, appOfKey } from './apps.hl'import { issueToken } from './app-tokens.hl'import { bearerOf, unauthorized, notFound, tooMany, appOfRequest } from './app-auth.hl'import { answerOf, jsonOfRequest, reply, fail, apiError, wantsMarkdown, markdownReply, textReply, goTo, sshGuard, repoOfRequest, safeNext } from './api-helpers.hl'import { ensurePulls } from './pullsync.hl'import { prOfRequest } from './prpage.hl'import { listPulls, getPull, postReview, listReviews, listThreads, postReply, resolveThread, listComments, postComment } from './reviews.hl'import { putStatus, listStatuses } from './statuses.hl'import { limitCheck } from './limits.hl'import { syncAndRaise, deliveryPage, redeliver } from './events.hl'import { notifyPush } from './tickets.hl'// ---- the API: public reads and creation with a person's access token ------------------------static apiRepos = (route, req) => {if (req.method == 'POST') { return apiCreateRepo(route, req) }if (req.method != 'GET') { return fail(405, 'GET only') }rows = repoRows(userIdOfSession(req.session))if (wantsMarkdown(req)) { return markdownReply(listDocument(rows)) }return reply(200, { repos = rows })}// POST /api/repos: app tokens remain read-only; owner comes only from the gtr_ token.static apiCreateRepo = (route, req) => {token = bearerOf(req)if (token != null && token.startsWith('gat_')) { return apiError(403, 'forbidden', 'app tokens cannot create repositories', null) }uid = userOfToken(token)if (uid == null) { return apiError(401, 'unauthorized', 'a user access token is required', null) }j = jsonOfRequest(req)if (j.error != null) { return j.error }r = createRepoFromInput(uid, j.json)if (r.error != null) {status = r.status == null ? 422 : r.statuscode = status == 403 ? 'forbidden' : (status == 409 ? 'conflict' : (status == 500 ? 'internal' : 'invalid'))return apiError(status, code, r.error, { field = r.field })}return reply(201, r.repo)}static apiRepo = (route, req) => {if (req.method != 'GET') { return fail(405, 'GET only') }row = repoRow(route.params.slug, userIdOfSession(req.session))if (row == null) { return fail(404, 'no such repository') }if (wantsMarkdown(req)) { return markdownReply(repoDocument(row)) }return reply(200, row)}// ---- NOTHING ELSE (mission MG, as ident's notFoundPage): the last route of project.hl answers a path no route knows with the// shell's 404 page (components/notfound.hl) — status 404, the page rendered by the framework with the request's session and hoststatic notFoundPage = (route, req, &srv, pageComponent) => {m = { route = { pattern = route.route.pattern component = pageComponent } kind = 'component' params = { path = req.path } path = req.path }res = srv.page(m, req.session, srv.hostOf(req.headers['host']), srv.requestHeaders(req.headers))res.status = 404return res}// `/:orepo` (GO34): on an organization's address (one the viewer may see) the first segment is a repo's Readme page, rendered like the 404 page is (a function route:// a stray single-segment path on any other address keeps its real 404 status — /.env, /host.js, a private organization's /x)static orgRepoPage = (route, req, &srv, pageComponent, missingComponent) => {h = req.headers['host']label = slugOfHost(h == null ? '' : h.split(':')[0])if (label == '' || orgFor(label, userIdOfSession(req.session)) == null) { return notFoundPage(route, req, &srv, missingComponent) }m = { route = { pattern = route.route.pattern component = pageComponent } kind = 'component' params = { orepo = req.path.slice(1) } path = req.path }return srv.page(m, req.session, srv.hostOf(h), srv.requestHeaders(req.headers))}// `/pulls/:n` and `/:orepo/pulls/:n` (gitoria#45): the PR's page when the repo is visible to the viewer and the number is one of its pull requests, else the// shell's 404 page (a function route, so the status is a real 404 for an unknown number)static pullPage = (route, req, &srv, pageComponent, missingComponent) => {h = req.headers['host']host = h == null ? '' : h.split(':')[0]orepo = route.params.orepo != null ? route.params.orepo : ''nText = route.params.nif (prOfRequest(host, orepo, req.session, nText) == null) { return notFoundPage(route, req, &srv, missingComponent) }m = { route = { pattern = route.route.pattern component = pageComponent } kind = 'component' params = { orepo = orepo n = nText } path = req.path }return srv.page(m, req.session, srv.hostOf(h), srv.requestHeaders(req.headers))}// any other /api path: the contract's JSON 404 (docs/apps-api.md §6)static notFoundApi = (route, req) => { return apiError(404, 'not_found', 'no such endpoint', null) }// ---- THE LOGIN BUTTON'S RETURN (ident README "How apps use ident") ----------------------------// ident sends the browser back with ?ident_code= (and our ?next=); the code is exchanged here (users.hl userOfLoginCode),// the user goes into THIS browser's session (`req.session`, the cookie's — hybriel #11; minted when it brought none),// then → `?next=` (api-helpers.hl safeNext). A FAILED LOGIN is a page (components/loginfailed.hl): the reason is parked// in the session, then → /login/failed.static loginFailed = (&req, &sessions, why) => {let s = req.sessionfresh = s == nullif (fresh) { s = sessions.mint() }s.data.loginError = whysessions.save(s)res = new Response('login failed: ' + why, { status = 302 headers = { 'Location' = '/login/failed' 'Cache-Control' = 'no-store' 'Content-Type' = 'text/plain; charset=utf-8' 'X-Content-Type-Options' = 'nosniff' } })if (fresh) { res.headers['Set-Cookie'] = sessions.cookieHeader(s.id) }return res}static loginCallback = (route, &req, &sessions) => {if (req.method != 'GET') { return loginFailed(&req, &sessions, 'GET only') }q = req.query != null ? req.query : {}code = q.ident_codeif (code == null || code == '') { return loginFailed(&req, &sessions, 'ident sent no login code') }x = userOfLoginCode(code)if (x.error != null) { return loginFailed(&req, &sessions, x.error) }// THE SAME SESSION, NEVER SIGNED OUT (ident#28): a good code signs the session the browser already has in (a second tab or an installed// app may not store a new cookie, and a session we signed out would leave it anonymous); none yet → minted herelet s = req.sessionif (s == null) { s = sessions.mint() }s.user = { id = x.user.id }s.data.tag = randomBytes(16)s.data.loginError = nullsessions.save(s)res = new Response('logged in', { status = 302 headers = { 'Location' = safeNext(q.next) 'Cache-Control' = 'no-store' 'Content-Type' = 'text/plain; charset=utf-8' 'X-Content-Type-Options' = 'nosniff' 'Set-Cookie' = sessions.cookieHeader(s.id) } })return res}// ---- ONE LOGIN FOR THE MAIN ADDRESS AND EVERY REPO ADDRESS ---------------------------------------------------------------------// Nothing here: hl:web (batch 20) does it. The session cookie carries `Domain=.<host>` (project.hl sessionDomain); among several gitoriasid// cookies the signed-in one wins and is re-issued with the Domain (the stray host-only copy expires), and a signed-in cookie is re-issued when its// attributes change (a login from before the Domain was set moves to it on its next request) and otherwise once a day. Gate: tests/browser.mjs "gitoria#24".// ---- CONNECT A REPO TO A TICKETS PROJECT (gitoria#18; tickets.hl, components/settings.hl) ----------------------------// /settings/connect: the owner's click → a fresh nonce parked in the session (bound to the repo) → tickets' /connect.// /settings/connected: tickets' return with ?code&state → tickets.hl finishConnect (nonce, exchange, key stored per// repo) → back to /settings. A failure is a note on the settings page.static connectStart = (route, &req, &sessions) => {if (req.method != 'GET') { return fail(405, 'GET only') }repo = repoOfRequest(route, req)if (repo == null) { return fail(404, 'no such repository') }s = req.sessionif (s == null || !ownsRepo(repo.slug, s)) { return goTo(px(repo.slug) + '/settings') }nonce = randomBytes(16)s.data.connectState = repo.slug + '.' + nonces.data.connectNote = nullsessions.save(s)return goTo(connectHref(repo.slug, nonce))}// One log line for every end of the connect flow (docker logs of the gitoria container): "connect-back <slug> <outcome> ..." and// never the code, the state value or a key. `state` only says whether tickets brought one.static connectLog = (slug, outcome, hasState) => {console.log('connect-back ' + slug + ' ' + outcome + ' state=' + (hasState ? 'present' : 'absent'))}static notSignedInNote = 'The connection to tickets did not finish: this browser is not signed in to gitoria as the repo owner. Sign in and press Connect again.'static connectBack = (route, &req, &sessions) => {if (req.method != 'GET') { return fail(405, 'GET only') }repo = repoOfRequest(route, req)if (repo == null) { return fail(404, 'no such repository') }q = req.query != null ? req.query : {}hasState = q.state != nulllet s = req.sessionif (s == null || userIdOfSession(s) == null || !ownsRepo(repo.slug, s)) {// nothing is exchanged; the code is dropped. The browser is told why on the settings page: a session-less browser gets a fresh// session that carries the note (like loginFailed), a session that exists keeps itself and gets the notewhy = s == null ? 'no-session' : (userIdOfSession(s) == null ? 'session-not-signed-in' : 'not-owner')connectLog(repo.slug, 'refused reason=' + why, hasState)fresh = s == nullif (fresh) { s = sessions.mint() }s.data.connectNote = notSignedInNotesessions.save(s)res = goTo(px(repo.slug) + '/settings')if (fresh) { res.headers['Set-Cookie'] = sessions.cookieHeader(s.id) }return res}want = s.data.connectStates.data.connectState = nullnote = finishConnect(repo.slug, want, q)s.data.connectNote = note == '' ? null : notesessions.save(s)if (note == '') {connectLog(repo.slug, 'connected', hasState)} else if (q.error != null && q.code == null) {connectLog(repo.slug, 'tickets-error', hasState)} else if (want == null || want != repo.slug + '.' + q.state) {connectLog(repo.slug, 'state-mismatch', hasState)} else {connectLog(repo.slug, 'exchange-failed', hasState)}return goTo(px(repo.slug) + '/settings')}// ---- WHAT THE SSHD CONTAINER ASKS (ticket gitoria#7; docker/sshd) — only with the shared secret (api-helpers.hl sshGuard)// GET /__git/keys?type=<ssh-ed25519>&key=<base64> sshd AuthorizedKeysCommand: the authorized_keys line for a known key// (sshkeys.hl keyLine), empty for an unknown one// GET /__git/access?user=<id>&slug=<slug>&write=0|1 gitoria-shell before it starts git: `ok` or 403. Read = every repo (public);// write = the repo's owner only (repos.hl mayPush — the same rule as the token on HTTPS, transport.hl)static gitKeys = (route, req) => {no = sshGuard(req)if (no != null) { return no }q = req.query != null ? req.query : {}return textReply(200, keyLine(q.type, q.key))}// GET /__git/pushed?user=<id>&slug=<slug>&phase=before|after gitoria-shell around a push over ssh (what transport.hl does for HTTPS):// before → the repo's existing pull requests are numbered (ensurePulls); after (git exited 0) → notifyPush + syncPulls for that user. `ok`; never an error for the push.static gitPushed = (route, req) => {no = sshGuard(req)if (no != null) { return no }q = req.query != null ? req.query : {}slug = q.slugif (slug == null || hlTypeName(slug) != 'String' || fullNameError(slug) != null) { return textReply(404, 'no such repository' + NL) }let repo = repoBySlug(slug)if (repo == null && forwardOf(slug) != null) { repo = repoBySlug(forwardOf(slug)) }if (repo == null || !mayPush(q.user, repo)) { return textReply(403, 'not allowed' + NL) }if (q.phase == 'before') { ensurePulls(repo.slug) }else if (q.phase == 'after') {notifyPush(repo.slug, false)syncAndRaise(repo.slug, q.user)} else { return textReply(400, 'phase is before or after' + NL) }return textReply(200, 'ok' + NL)}static gitAccess = (route, req) => {no = sshGuard(req)if (no != null) { return no }q = req.query != null ? req.query : {}slug = q.slugif (slug == null || hlTypeName(slug) != 'String' || fullNameError(slug) != null) { return textReply(404, 'no such repository' + NL) }let repo = repoBySlug(slug)if (repo == null && forwardOf(slug) != null) { repo = repoBySlug(forwardOf(slug)) }// the asker is the key's user: a repo they may not see does not exist for them (404, as over HTTPS)if (repo == null || !mayRead(q.user, repo)) { return textReply(404, 'no such repository' + NL) }if (q.write == '1' && !mayPush(q.user, repo)) { return textReply(403, 'only the owner or a member of this repository can push to it' + NL) }// the sshd container runs git in the repo's real folder: tell it the name (it differs after a move)return textReply(200, 'ok ' + repo.slug + NL)}// ---- CONNECT AN APP TO A REPO (gitoria#41; apps.hl, docs/apps-api.md §1 flow A) ----------------------------------------------------// /settings/apps/connect?app&hook&return&state: the app sends the owner's browser here. The four values are checked (the URL allow-list:// anything else is 400 invalid_url) and PARKED in the session with a nonce; then → the repo's settings page, which asks the person to sign in// (the same session goes on after the login) and, for the owner, shows "Connect <app> to <repo>?" with a Yes / No form.// /settings/apps/confirm (POST): the form's answer → the owner check, the nonce, a one-time code → redirect to return?code&state (No: return?error=denied&state).static appConnectStart = (route, &req, &sessions) => {if (req.method != 'GET') { return apiError(405, 'invalid', 'GET only', null) }repo = repoOfRequest(route, req)if (repo == null) { return apiError(404, 'not_found', 'no such repository', null) }q = req.query != null ? req.query : {}if (!urlAllowed(q.hook)) { return apiError(400, 'invalid_url', 'hook is not an allowed receiver address', { field = 'hook' }) }if (!urlAllowed(q['return'])) { return apiError(400, 'invalid_url', 'return is not an allowed address', { field = 'return' }) }bad = nameError(q.app)if (bad != null) { return apiError(422, 'invalid', bad, { field = 'app' }) }if (q.state == null || hlTypeName(q.state) != 'String' || q.state.length == 0 || q.state.length > 200) { return apiError(422, 'invalid', 'state is missing or too long', { field = 'state' }) }let s = req.sessionfresh = s == nullif (fresh) { s = sessions.mint() }s.data.appConnect = { slug = repo.slug app = ('' + q.app).trim() hook = q.hook ret = q['return'] state = q.state nonce = randomBytes(16) }sessions.save(s)res = goTo(px(repo.slug) + '/settings')if (fresh) { res.headers['Set-Cookie'] = sessions.cookieHeader(s.id) }return res}static appConnectConfirm = (route, &req, &sessions) => {if (req.method != 'POST') { return apiError(405, 'invalid', 'POST only', null) }repo = repoOfRequest(route, req)if (repo == null) { return apiError(404, 'not_found', 'no such repository', null) }home = px(repo.slug) + '/settings'let s = req.sessionif (s == null || userIdOfSession(s) == null || !ownsRepo(repo.slug, s)) { return goTo(home) }p = s.data.appConnectf = formFields(req.body)if (p == null || p.slug != repo.slug || f.nonce == null || f.nonce != p.nonce) { return goTo(home) }// one try: the parked request goes whatever the answer iss.data.appConnect = nullsessions.save(s)if (f.decision != 'yes') { return goTo(withQuery(p.ret, { error = 'denied' state = p.state })) }code = makeCode(repo, p.app, p.hook, userIdOfSession(s))if (code == null) { return goTo(home) }return goTo(withQuery(p.ret, { code = code state = p.state }))}// POST /api/apps/exchange {"code"} (no auth): the app's server trades the code → { key, secret, api, repo, app } (apps.hl exchangeCode)static appExchange = (route, req) => {if (req.method != 'POST') { return apiError(405, 'invalid', 'POST only', null) }repo = repoOfRequest(route, req)if (repo == null) { return apiError(404, 'not_found', 'no such repository', null) }j = jsonOfRequest(req)if (j.error != null) { return j.error }x = exchangeCode(repo, j.json.code)if (x.notFound == true) { return apiError(404, 'not_found', 'unknown, used or expired code', null) }return reply(200, x.body)}// POST {api}/apps/token Authorization: Bearer gak_… → 200 { token, expires } (app-tokens.hl); the key must be the key of the repo the address namesstatic appToken = (route, req) => {if (req.method != 'POST') { return apiError(405, 'invalid', 'POST only', null) }app = appOfKey(bearerOf(req))if (app == null) { return unauthorized() }repo = repoOfRequest(route, req)if (repo == null || repo.id != app.repo) { return notFound() }wait = limitCheck(app.id, req.method)if (wait > 0) { return tooMany(wait) }t = issueToken(app)if (t.error != null) { return apiError(500, 'internal', 'could not make a token', null) }return reply(200, { token = t.token expires = t.expires })}// GET {api}/deliveries?cursor=&limit= → { deliveries: [{ id, event, action, time, status, tries, lastCode }], next } — the app's OWN deliveries (events.hl)static appDeliveries = (route, req) => {if (req.method != 'GET') { return apiError(405, 'invalid', 'GET only', null) }who = appOfRequest(route, req)if (who.error != null) { return who.error }q = req.query != null ? req.query : {}return reply(200, deliveryPage(who.app.id, q.cursor, q.limit == null ? null : toNumber(q.limit)))}// POST {api}/deliveries/:id/redeliver → 202; the same delivery id goes out again. Another app's delivery (or none) is a 404, like any foreign thingstatic appRedeliver = (route, req) => {if (req.method != 'POST') { return apiError(405, 'invalid', 'POST only', null) }who = appOfRequest(route, req)if (who.error != null) { return who.error }if (!redeliver(who.app.id, route.params.id)) { return apiError(404, 'not_found', 'no such delivery', null) }return reply(202, { accepted = true })}// ---- the apps API's PR routes (gitoria#44; lib/reviews.hl does the work, these only check the method and the app, and answer)// GET {api}/pulls?state=&cursor=&limit=static appPulls = (route, req) => {if (req.method != 'GET') { return apiError(405, 'invalid', 'GET only', null) }who = appOfRequest(route, req)if (who.error != null) { return who.error }return answerOf(listPulls(who.repo, req.query))}// GET {api}/pulls/Nstatic appPull = (route, req) => {if (req.method != 'GET') { return apiError(405, 'invalid', 'GET only', null) }who = appOfRequest(route, req)if (who.error != null) { return who.error }return answerOf(getPull(who.repo, route.params.n))}// GET / POST {api}/pulls/N/reviewsstatic appReviews = (route, req) => {if (req.method != 'GET' && req.method != 'POST') { return apiError(405, 'invalid', 'GET or POST only', null) }who = appOfRequest(route, req)if (who.error != null) { return who.error }if (req.method == 'GET') { return answerOf(listReviews(who.app, who.repo, route.params.n, req.query)) }j = jsonOfRequest(req)if (j.error != null) { return j.error }return answerOf(postReview(who.app, who.repo, route.params.n, j.json))}// GET {api}/pulls/N/threadsstatic appThreads = (route, req) => {if (req.method != 'GET') { return apiError(405, 'invalid', 'GET only', null) }who = appOfRequest(route, req)if (who.error != null) { return who.error }return answerOf(listThreads(who.app, who.repo, route.params.n, req.query))}// POST {api}/pulls/N/threads/:id/repliesstatic appReply = (route, req) => {if (req.method != 'POST') { return apiError(405, 'invalid', 'POST only', null) }who = appOfRequest(route, req)if (who.error != null) { return who.error }j = jsonOfRequest(req)if (j.error != null) { return j.error }return answerOf(postReply(who.app, who.repo, route.params.n, route.params.id, j.json))}// POST {api}/pulls/N/threads/:id/resolvestatic appResolve = (route, req) => {if (req.method != 'POST') { return apiError(405, 'invalid', 'POST only', null) }who = appOfRequest(route, req)if (who.error != null) { return who.error }j = jsonOfRequest(req)if (j.error != null) { return j.error }return answerOf(resolveThread(who.app, who.repo, route.params.n, route.params.id, j.json))}// GET / POST {api}/pulls/N/comments (the PR's conversation)static appComments = (route, req) => {if (req.method != 'GET' && req.method != 'POST') { return apiError(405, 'invalid', 'GET or POST only', null) }who = appOfRequest(route, req)if (who.error != null) { return who.error }if (req.method == 'GET') { return answerOf(listComments(who.repo, route.params.n, req.query)) }j = jsonOfRequest(req)if (j.error != null) { return j.error }return answerOf(postComment(who.app, who.repo, route.params.n, j.json))}// PUT {api}/statuses/<sha> {"context","state","title","summary","url"} → 200 { status } (statuses.hl): the app sets the state of a commit, a newer PUT replaces the older onestatic appStatus = (route, req) => {if (req.method != 'PUT' && req.method != 'GET') { return apiError(405, 'invalid', 'GET or PUT only', null) }who = appOfRequest(route, req)if (who.error != null) { return who.error }// GET (v1.3): every context on that sha, from every app; a sha this repo does not have is 404 not_found (§6 shape)if (req.method == 'GET') {l = listStatuses(who.repo, route.params.sha)if (l.unknown == true) { return apiError(404, 'not_found', 'that sha is not a commit of this repository', null) }return reply(200, { statuses = l.statuses })}j = jsonOfRequest(req)if (j.error != null) { return j.error }r = putStatus(who.repo, who.app, route.params.sha, j.json)if (r.invalid != null) { return apiError(422, 'invalid', 'the status is not valid', r.invalid) }if (r.unknown == true) { return apiError(422, 'invalid', 'that sha is not a commit of this repository', [{ field = 'sha' reason = 'no_such_commit' }]) }return reply(200, { status = r.status })}
Branches
- f1-broken-json
- f2-api-bugs
- gp-gate-ports
- heap-revert
- hl25-records
- ident-chooser-selector
- mainmain branch
- p51-public-pr-reads
- records-1112
- s25-no-session-on-login-error
- v59
- w52-person-approval
- w52b-approval-followup
- w52c-header-phone
- w53-pulls-speed-pr
- w54-repo-rename-pr
- w55-rename-org
- w56-owner-members
- w62-pr-close
- w63-force-push
- w64-org-slash
Latest commits
- 166c775fW48 report, logmre
- 1075c38cW48 mission, logmre
- 17bdd0d6V37/V39 missions, logmre
- 146de5f8Re-vendor gitoria to Hybriel set-day39 (51e921d7)mre
- e874e44dtests/status-keyed: app token lives 60 s so it outlives the gate's two restartsmre
- 270b8d61deploy.sh: DEPLOY_STOP_START=1 stops, waits for the old pid, then starts (mpackdb freeze, replaces the standby swap)mre
- 3f9235b8project.hl: drop the dummy /pulls/:n component route (hybriel#294 is fixed in day37)mre
- c90daf19Re-vendor gitoria to Hybriel set-day37 (f6b3d45b)mre
- 03b5bb08W39 report to reports/, drop scratch repro, mission + logmre
- 154d333fMerge w39-create-api: POST /api/repos with a user token (#39)mre
- 149dd512Rewrite W39 reportmre
- e5385075Expect 401 for POST /api/repos without a tokenmre
- 1a76055cDocument repository creation APImre
- 4d779b3bAdd create-api gatemre
- 88563122Add POST /api/repos for user tokensmre
- b00860e3Create repositories with member checks in createRepoInmre
- 0a38f236Report repository creation API blockermre
- b5f72187Record malformed JSON blocker for repository creationmre
- a2ae8302logmre
- 6947cd58logmre