gitoria

gitoria

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit40eb3ca140eb3ca1gitoria#38: review package, logmre40eb3ca1/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

  • 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
  • b6b793afgitoria#45: PR page with reviews, threads, conversation, Review again (merge w45-pr-page)mre
  • fb9e7554gitoria#45: browser gate: a /pulls title links to the PR pagemre
  • f7198131gitoria#45: tests/pr-page.mjs gatemre
  • 483141d0gitoria#45: Settings shows the Apps heading only to the ownermre
  • e2eff8f6gitoria#45: the PR page /pulls/N with reviews, threads, verdicts, conversation, comment, reply, resolve and Review againmre
  • 7a602839gitoria#45: raiseEvent can send to one app only; people's comments, replies and resolving in reviews.hlmre
  • 5de7f578gitoria#47: rate limits per app (429, Retry-After), status read route, statuses and required on the pull, one JSON check for every write routemre
  • 19edc1f5gitoria#44: contract v1.3.1, what outdated meansmre
  • 7c2277ccgitoria#38: worker reports W40–W46, logmre