gitoria

gitoria

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit34143d2c34143d2cgitoria#46: closing brace of appComments lost in the mergemre34143d2c/lib/forwards.hl

1.0 KB

  1. // lib/forwards.hl — A MOVED REPO'S OLD ADDRESS (ticket gitoria#34, GO34). tools/move-repo.hl leaves a row per move:
  2. // forwardsTable pk @id index !oldName { oldName (the old full name), to (the new one), created } storage/mpackdb/forwards.db
  3. // The old address shows "moved to …" (a page cannot redirect: hl:web gap, .scratch/repro-redirect), and git over HTTP and SSH on
  4. // the old path is served from the new place (transport.hl, api.hl gitAccess).
  5. import { MPackDB } from 'hl:mpackdb'
  6. import { now } from 'hl:time'
  7. import { storageDir, firstOf } from './util.hl'
  8. static forwardsTable = new MPackDB(file = storageDir + '/forwards.db', primaryKey = '@id', indexes = ['!oldName'])
  9. static forwardOf = (name) => {
  10. if (name == null || hlTypeName(name) != 'String' || name == '') { return null }
  11. r = firstOf(forwardsTable.find('oldName', name))
  12. return r == null ? null : r.to
  13. }
  14. static putForward = (name, to) => {
  15. old = firstOf(forwardsTable.find('oldName', name))
  16. if (old != null) { forwardsTable.delete(old.id) }
  17. return forwardsTable.put({ oldName = name to = to created = now() }) != null
  18. }

Branches

Latest commits

  • 34143d2cgitoria#46: closing brace of appComments lost in the mergemre
  • 54927c9cgitoria#46: PR statuses and required checks before merge (merge w46-status)mre
  • 187e1871gitoria#46: badges without decorative bordersmre
  • 6b022798gitoria#46: tests/status.mjs in GATESmre
  • c6162f00gitoria#46: status badges on /pulls, Required before merge in Settingsmre
  • e5a0b64egitoria#46: PUT statuses/<sha>, required contexts block the merge on the servermre
  • 26a140e3gitoria#44: reviews, inline threads, replies, conversation for apps (merge w44-reviews)mre
  • 888dbf87gitoria#44: unknown API paths answer the contract's JSON 404 and sit above the page routesmre
  • ea587d90gitoria#44: reviews with inline threads, replies, resolve and the PR conversation for apps (lib/reviews.hl, tests/reviews.mjs)mre
  • 49533a50gitoria#43: signed events to connected apps (merge w43-events)mre
  • 1a1e87d5gitoria#43: the sender never writes the apps row; Settings shows the newest deliverymre
  • cd442066gitoria#43: app-auth unit test reads the apps table from its new filemre
  • 5dccbe38gitoria#43: in-flight rows are left alone by the other process; gate in deploy.sh; READMEmre
  • 8c8805f3merge main (gitoria#42), delivery log and redelivery routes, sweep fixmre
  • 5a996ea8gitoria#42: short-lived app tokens, read-only git fetch with them (merge w42-app-token)mre
  • afdb0cbfgitoria#43: rename the moved helper (name clash in the browser build)mre
  • 15e01e94gitoria#43: tests/events.mjs and its probemre
  • 77829b73gitoria#43: signed events to connected apps (deliveries table, sender timer, pull_request events, ping)mre
  • b5d696fegitoria#42: app tokens (gat_, one hour), appOfRequest, app token as the git read passwordmre
  • 1997e77dgitoria#40: stable PR numbers, refs/pull/N/head, ssh pushes reach the app (merge w40-pr-number)mre