gitoria

gitoria

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commite7af3ecee7af3eceMerge branch 'w52b-approval-followup' into mainGitoriae7af3ece/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

  • e7af3eceMerge branch 'w52b-approval-followup' into mainGitoria
  • c01e66c6|||PR approvals follow-up: live Merge after status writes, helpers (#52)mre
  • 841da497Merge branch 'w53-pulls-speed-pr' into mainGitoria
  • 80307ae2|||PR pulls page cache: live PR numbers, complete scans onlymre
  • 69141f65|||PR pulls page: cache the git part per repo by branch tipsmre
  • 155861f6Merge branch 'w52-person-approval' into mainGitoria
  • b5435de8|||PR person approvals: second Kunibert round (#52)mre
  • 3a8b2fb8|||PR person approvals: Kunibert review fixes (#52)mre
  • 2a89d8d0|||PR person approvals: Approve button for people; merge needs the required checks or a listed person's approval (#52)mre
  • 83f0c953Report person approval verificationmre
  • 3ae94b86Record browser failures and verify owned tab cleanupmre
  • 54eec687Gate person approvals and merge alternativesmre
  • 12b08829Add person approvals for pull request headsmre
  • 55c84779Merge branch 'gp-gate-ports' into mainGitoria
  • 57af42bbREADME: point to deploy.sh for the port listmre
  • d63375d2README: gate commands with explicit portsmre
  • feeaa701|||PR gates: explicit ports only, deploy.sh passes themmre
  • 6cc1f943Merge branch 'records-1112' into mainGitoria
  • 9448c438|||PR records: LOG, missions and reports since 11-09mre
  • 6dc08a8eMerge branch 'p51-public-pr-reads' into mainGitoria