gitoria

gitoria

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit4fda244f4fda244fgitoria#22: RepoTabs wrapping component for the repo tabs (active tab, no content for a missing repo)mre4fda244f/components/releases.hl

2.2 KB

  1. // components/releases.hl — THE RELEASES of a repo (gitoria#12, gitoria#16): `/releases` on <slug>.<domain>, its
  2. // own route. The repo head is rendered on the server from the request's host. The list comes from git (the
  3. // |||RL commits of the main branch) on the SERVER too
  4. // (lib/releases.hl releasesNow — hl:proc run() waits, hybriel#80): it is in the first HTML and in every hl:web navigation.
  5. parent './main.hl'
  6. import { siteName } from '../project.hl'
  7. import RepoTabs from './repotabs.hl'
  8. import { slugOfHost } from '../lib/util.hl'
  9. import { repoAt } from '../lib/repos.hl'
  10. import { pageTitle } from '../lib/repos-helpers.hl'
  11. import { releasesNow } from '../lib/releases.hl'
  12. host = null
  13. slug = slugOfHost(host)
  14. repo = repoAt(slug)
  15. hasRepo = repo != null
  16. got = repo != null ? releasesNow(slug, repo.branch) : null
  17. releasesShown = got != null && !got.isMessage
  18. releasesMessage = got != null && got.isMessage
  19. releasesText = got != null && got.isMessage ? got.message : ''
  20. releasesNone = got != null && !got.isMessage && got.noReleases
  21. releasesList = got != null && !got.isMessage ? got.releases : []
  22. releasesDefault = got != null && !got.isMessage ? got.defaultName : ''
  23. __title = pageTitle(siteName, slug, 'Releases')
  24. View {
  25. RepoTabs { tab = 'releases'
  26. if (hasRepo) {
  27. repoReleases { id = "releases"
  28. if (releasesMessage) { p { id = "releasesmessage" class = "empty" releasesText } }
  29. if (releasesShown) {
  30. p { id = "releaseshelp" class = "muted" "A commit on " strong { releasesDefault } " whose message starts with " code { "|||RL " } " makes a release: the last version +1; " code { "|||RL|med " } " counts the middle number, " code { "|||RL|mj " } " the major number, " code { "|||RL|1.1.1a " } " sets the version." }
  31. if (releasesNone) { p { id = "noreleases" class = "empty" "No release yet." } }
  32. ol { id = "releaselist"
  33. for (rl of releasesList) {
  34. li {
  35. strong { class = "version" rl.version }
  36. if (rl.isLatest) { span { class = "latest" "latest" } }
  37. if (rl.hasTitle) { a { class = "subject" href = rl.href rl.title } }
  38. if (rl.noTitle) { a { class = "subject muted" href = rl.href rl.short } }
  39. span { class = "muted" rl.author }
  40. time { rl.date }
  41. }
  42. }
  43. }
  44. }
  45. }
  46. }
  47. }
  48. }

Branches

Latest commits

  • 4fda244fgitoria#22: RepoTabs wrapping component for the repo tabs (active tab, no content for a missing repo)mre
  • 0fd5e280mission brief 004mre
  • e1d425e7paths: projects moved into /media/STORAGE/projects/WorldAPI/mre
  • e59ff114deploy.sh: wait up to DEPLOY_URL_WAIT (120 s) for 200 after the restart, as the other apps (cold compile, hybriel#148)mre
  • bcafcceb003: compose cache volume + tmpfs /tmp, gate start waits 120 s, report/LOG/STATUSmre
  • bed3f2d5Re-vendor Hybriel to the shared static build 0f396652 (plugins; bin/ is git-ignored)mre
  • 3207e128mission brief 003mre
  • 18ab71fbtests/ticketskit: wait up to 120 s for tickets (native Hybriel cold compile ~25 s, hybriel#148)mre
  • 4fffa966docker-compose: init: true (hybriel#156, PID 1 ignored SIGTERM, every restart waited 10 s)mre
  • 4f47843egate: ticket links use the tickets short URL (/<slug>/<n>, tickets#25)mre
  • 86605446mission 002 (code order) 4/4: README file map + import order + 'Same output' test + gate run with a tickets HEAD copy, STATUS (entry, lessons), LOG, report; tests/realdata-baseline.mjs + realdata-compare.py (a cleanup answers the same on live data: pages, modules, API, git over HTTPS and SSH, faces), tests/letcount.pymre
  • cc7bf7bamission 002 (code order) 3/4: let only where a variable is reassigned or re-bound in a loop body (289 lets → plain declarations; 213 left: 125 reassigned, 88 loop-bound; no member/import/param clash). gates 200/0, 46/0, 44/0; real-data reads + writes identical (browser modules: var → const only)mre
  • 090a20c6mission 002 (code order) 2/4: one lib/ file per topic — git.hl split into git (calls, branches, init, temp folder) / homepage / code / pulls / releases (+ git-helpers: paths, ids, |||PR/|||RL markers); repos-helpers, tickets-helpers, transport-helpers; util.hl = localtime + env, storage dir, addresses, lists, text checks, one newest-first sort (was 3 copies); the function routes out of project.hl into lib/api.hl (thin; plumbing in api-helpers.hl), sshgate.hl folded into api.hl + sshkeys.hl keyLine + repos.hl mayPush; 'Make main' and the merge answer out of the faces (code.hl makeMain, pulls.hl pullsView), one login helper (users.hl userOfLoginCode); project.hl is the map. Session-writing routes get &req + &server.sessions. gates 200/0, 46/0, 44/0; real-data identical except /login/failed now shows the parked reason for a browser that already had a session (the old copy-of-req lost it)mre
  • 110c2799mission 002 (code order) 1/4: .hl files out of the root — lib/ (api, git, localtime, markdown, repos, sshgate, sshkeys, tickets, tokens, transport, users), components/styles.hl; jsoncheck.hl removed (imported nowhere); import paths only. gates 200/0, 46/0, 44/0; real-data reads + writes identicalmre
  • fdfb4b1bgitoria: Hybriel master 06617221 (plugin allocators 3a781359 + 413f60e4, mpackdb 2cb7ae5e, http1 773de63e); gates 200/0, 46/0, 44/0mre
  • 5b46ac84antcolony#40: LOG.md — missions 069/072 are antcolony missions (report paths on Byrodin)mre
  • 5602ff41gitoria: Hybriel master 190aa11d (fc838894 GC correctness, #127 mountKids by reference, #126, #48) — tracker README flat; gates 200/0, 46/0, 44/0mre
  • e85eaf01gitoria: 069 round 2 — hybriel 1a096ad3 not adopted (Markdown SSR still grows); browser gate waits for the server-side logout before restartmre
  • 09ce4f3fgitoria: mission 069 re-vendor hybriel 8efba065 stopped (big SSR pages grow + slow down); lambda audit clean; old vendor keptmre
  • 3dc43108antcolony#40: mission references point to the moved missionsmre