gitoria

gitoria

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitcd442066cd442066gitoria#43: app-auth unit test reads the apps table from its new filemrecd442066/components/readme.hl

2.6 KB

  1. // components/readme.hl — THE README VIEW of a repo (ticket #8, gitoria#16): `/` on <slug>.<domain>, composed
  2. // into components/index.hl. Rendered on the SERVER with its content: the repo from the request's host, the
  3. // README.md / $docs Markdown from git (lib/homepage.hl homepageNow — hl:proc run() waits, hybriel#80).
  4. import Markdown from './markdown.hl'
  5. import { slugOfRequest } from '../lib/orgs.hl'
  6. import { px, repoOrigin } from '../lib/util.hl'
  7. import { forwardOf } from '../lib/forwards.hl'
  8. import { repoAt } from '../lib/repos.hl'
  9. import { homepageNow } from '../lib/homepage.hl'
  10. host = null
  11. orepo = ''
  12. session = null
  13. slug = slugOfRequest(host, orepo)
  14. repo = repoAt(slug, session)
  15. hasRepo = repo != null
  16. pre = px(slug)
  17. codeHref = pre + '/code'
  18. movedTo = repo == null ? forwardOf(slug) : null
  19. wasMoved = movedTo != null
  20. movedHref = movedTo != null ? repoOrigin(movedTo) + '/' : ''
  21. home = repo != null ? homepageNow(slug, repo.branch) : null
  22. docsFound = home != null && home.found
  23. docsNone = home != null && !home.found
  24. docsTruncated = home != null && home.truncated
  25. docs = home != null ? home.files : []
  26. View {
  27. repoPage {
  28. if (wasMoved) { p { id = "moved" class = "notice" "This repository moved to " a { id = "movedlink" href = movedHref movedTo } "." } }
  29. if (hasRepo) {
  30. dl {
  31. dt { "Address" }
  32. dd { a { id = "repoaddress" href = repo.address repo.address } }
  33. dt { "Owner" }
  34. dd { id = "repoowner" repo.owner }
  35. dt { "Created" }
  36. dd { time { id = "repocreated" repo.created } }
  37. }
  38. if (docsNone) { p { id = "nohomepage" class = "empty" "This repository has no README.md yet. Open the " a { id = "tocode" href = codeHref "Code" } " page to see how to push code." } }
  39. if (docsFound) {
  40. repoHomepage { id = "homepage"
  41. for (d of docs) {
  42. homepageFile {
  43. if (d.isDocs) { code { class = "path" d.path } }
  44. Markdown { blocks = d.blocks }
  45. }
  46. }
  47. if (docsTruncated) { p { id = "docstruncated" class = "muted" "Very long files are cut off here." } }
  48. }
  49. }
  50. }
  51. }
  52. }
  53. Style {
  54. dl {
  55. display = 'grid'
  56. gridTemplateColumns = 'auto minmax(0, 1fr)'
  57. gap = '.3rem 1rem'
  58. alignItems = 'center'
  59. margin = '0'
  60. }
  61. dt {
  62. color = 'var(--color-text-muted)'
  63. }
  64. dd {
  65. margin = '0'
  66. overflowWrap = 'anywhere'
  67. '> a' {
  68. display = 'inline-flex'
  69. alignItems = 'center'
  70. minHeight = '2.75rem'
  71. }
  72. }
  73. homepageFile {
  74. display = 'grid'
  75. gap = '.5rem'
  76. minWidth = '0'
  77. '> *' {
  78. margin = '0'
  79. }
  80. '> .path' {
  81. color = 'var(--color-text-muted)'
  82. fontSize = '.875rem'
  83. background = 'transparent'
  84. padding = '0'
  85. }
  86. }
  87. repoHomepage {
  88. display = 'grid'
  89. gap = '1.5rem'
  90. minWidth = '0'
  91. }
  92. }

Branches

Latest commits

  • 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
  • 9364fb16gitoria#40: ssh pushes call /__git/pushed before and after (ensurePulls, notifyPush, syncPulls); gate over the sshd imagemre
  • fdb9ed28gitoria#41: repo owners can connect an app (merge w41-apps-connect)mre
  • 2ef23df0gitoria#40: the browser gate reads the title without the #Nmre
  • 9af07ecegitoria#41: connect an app to a repo (apps table, connect flow, manual add, allow-list, settings)mre
  • b9137ff0gitoria#40: pull requests are stored with a number, refs/pull/N/head, syncPulls and pullObject; /pulls shows #Nmre
  • 06d622daown image tag gitoria-runtime:debian12 for gitoria and standby (shared tag lost git)mre
  • 20caa33agitoria#37: media queries in the language's @media block (minWidth = '60rem') in list, codebrowser and repomre
  • c4175e6dgitoria: a startup error prints its message before exit 1 (hybriel#247)mre
  • c50d17efKeep function-route not-found style in shared stylesheetmre
  • e42d78d3Preserve ticket state CSS and document function-route style gapmre
  • c6b7154eWIP gitoria#26: move styles into nested component blocksmre