gitoria

gitoria

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit1a76055c1a76055cDocument repository creation APImre1a76055c/lib/apps-table.hl

1006 B

  1. // lib/apps-table.hl — the apps table (gitoria#41) and its plain reads, apart from lib/apps.hl so that lib/events.hl (gitoria#43) can read the apps
  2. // without importing apps.hl (apps.hl raises the ping through events.hl). Statics only. Row shape: see lib/apps.hl.
  3. import { MPackDB } from 'hl:mpackdb'
  4. import { storageDir, countOfList } from './util.hl'
  5. static appsTable = new MPackDB(file = storageDir + '/apps.db', primaryKey = '@id', indexes = ['!keyHash', 'repo'])
  6. // a whole app record with some fields changed (update() replaces the record: every field must be given again)
  7. static appWith = (a, change) => {
  8. o = { id = a.id repo = a.repo name = a.name hookUrl = a.hookUrl keyHash = a.keyHash secret = a.secret createdBy = a.createdBy created = a.created lastDelivery = a.lastDelivery lastStatus = a.lastStatus }
  9. for (k of change.keys()) { o[k] = change[k] }
  10. return o
  11. }
  12. static appsOfRepo = (repoId) => {
  13. all = appsTable.find('repo', repoId)
  14. return countOfList(all) == 0 ? [] : all
  15. }

Branches

Latest commits

  • 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
  • 2175e48clogmre
  • 40eb3ca1gitoria#38: review package, logmre
  • 06a5a50egitoria#38: deploy b8252ca, logmre
  • b8252ca0gitoria#46: W46b report, logmre
  • 50093aafgitoria#46: statuses keyed by app + context (merge w46b-keyed)mre
  • dd0267edgitoria#46: fix a label in the keyed gatemre
  • b1dcb580gitoria#46: statuses keyed by app + context, required = app + context, old rows still readmre
  • 2287363egitoria#47: W47 report, logmre
  • 9f502db1gitoria#46: W46b briefmre
  • 9678a8f3gitoria#46: contract v1.4, statuses keyed by app + contextmre
  • bdcbbaa9gitoria#47: rate limits, status read route, statuses + required on the pull (merge w47-limits)mre
  • 772c401fgitoria#45: W45 report, logmre