gitoria

gitoria

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit477d7bdc477d7bdcMerge branch 'p50'mre477d7bdc/components/releases.hl

3.0 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 './repo.hl'
  6. import { siteName } from '../project.hl'
  7. import { slugOfRequest } from '../lib/orgs.hl'
  8. import { titleSlug, repoAt } from '../lib/repos.hl'
  9. import { pageTitle } from '../lib/repos-helpers.hl'
  10. import { releasesNow } from '../lib/releases.hl'
  11. host = null
  12. orepo = ''
  13. session = null
  14. slug = slugOfRequest(host, orepo)
  15. repo = repoAt(slug, session)
  16. hasRepo = repo != null
  17. got = repo != null ? releasesNow(slug, repo.branch) : null
  18. releasesShown = got != null && !got.isMessage
  19. releasesMessage = got != null && got.isMessage
  20. releasesText = got != null && got.isMessage ? got.message : ''
  21. releasesNone = got != null && !got.isMessage && got.noReleases
  22. releasesList = got != null && !got.isMessage ? got.releases : []
  23. releasesDefault = got != null && !got.isMessage ? got.defaultName : ''
  24. __title = pageTitle(siteName, titleSlug(host, orepo, session), 'Releases')
  25. View {
  26. repoPage {
  27. if (hasRepo) {
  28. repoReleases { id = "releases"
  29. if (releasesMessage) { p { id = "releasesmessage" class = "empty" releasesText } }
  30. if (releasesShown) {
  31. 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." }
  32. if (releasesNone) { p { id = "noreleases" class = "empty" "No release yet." } }
  33. ol { id = "releaselist"
  34. for (rl of releasesList) {
  35. li {
  36. strong { Style.strongVersion rl.version }
  37. if (rl.isLatest) { span { Style.spanLatest "latest" } }
  38. if (rl.hasTitle) { a { Style.aReleaseSubject href = rl.href rl.title } }
  39. if (rl.noTitle) { a { Style.aReleaseSubject class = "muted" href = rl.href rl.short } }
  40. span { class = "muted" rl.author }
  41. time { rl.date }
  42. }
  43. }
  44. }
  45. }
  46. }
  47. }
  48. }
  49. }
  50. Style {
  51. repoReleases {
  52. display = 'grid'
  53. gap = '1rem'
  54. minWidth = '0'
  55. // Direct-child universal selectors have no bare language form.
  56. '> *' {
  57. margin = '0'
  58. }
  59. }
  60. #releaselist {
  61. display = 'grid'
  62. gap = '.4rem'
  63. margin = '0'
  64. padding = '0'
  65. listStyle = 'none'
  66. li {
  67. display = 'flex'
  68. flexWrap = 'wrap'
  69. alignItems = 'center'
  70. gap = '0 .8rem'
  71. margin = '0'
  72. padding = '.1rem 1rem .3rem'
  73. background = 'var(--color-surface)'
  74. borderRadius = 'var(--radius-large)'
  75. overflowWrap = 'anywhere'
  76. }
  77. }
  78. strongVersion {
  79. fontSize = '1.05rem'
  80. color = 'var(--color-accent)'
  81. }
  82. spanLatest {
  83. fontSize = '.875rem'
  84. color = 'var(--color-text-muted)'
  85. }
  86. aReleaseSubject {
  87. flex = '1 1 12rem'
  88. display = 'inline-flex'
  89. alignItems = 'center'
  90. minHeight = '2.75rem'
  91. }
  92. }

Branches

Latest commits

  • 477d7bdcMerge branch 'p50'mre
  • 00efc06fP50 reportmre
  • e3f85afblog: commit mention slipmre
  • 4d1a4cf4log: #25 numbersmre
  • 1af0a60ddocs: H25 run() correctionmre
  • eefa2dbcRepo setting: refuse direct pushes to the main branch (pre-receive over HTTPS and ssh)mre
  • 8c8ba2f1log: PR flow announcedmre
  • fa00cd35log: Kunibert pings provenmre
  • 3a68cfaclog: components decisionmre
  • 87de8e31log: Kunibert connected to 9 app reposmre
  • c22aff69log: PR-only rollout startedmre
  • 25309981log: STOP and paused workers 2026-11-08mre
  • 5286803alog: worker briefs and reports of 2026-11-08mre
  • 85c86605log: 2026-11-08 Arachne on list shapemre
  • cb634512log: 2026-11-08 keyed lists livemre
  • 07c98d4aLists: keyed rows with @id, remove(id) and one whole-list assignment instead of hand-rebuilt loopsmre
  • 0db0d81elog: 2026-11-08 day52 live, W30 startedmre
  • b05f6d92tests/status: the gate's 3 s app token expired during the restart; it lives 60 s like status-keyedmre
  • 1e8f4f0avendor: Hybriel set-day52 (fault-path leak fix #335, keyed rows #331)mre
  • f5f0fb7blog: 2026-11-08 day50/#29 live, H25 correction, V52 startedmre