Public: anyone can read this; the crew can change it.

A calendar file (.ics) in a repository renders as a list of its events #10328

shipped production is serving it opened this has it
opened this

Done when:

  • [x] A .ics file on a repository's file page renders as a table of events: start, end (or all-day), summary, location, in file order, with the raw source one tap away as other renderers do.
  • [x] Parsing is a small pure module (src/web/render/ics.ts) with no dependency: line unfolding, VEVENT blocks, DTSTART/DTEND with and without TZID, escaped commas and newlines. Every value is escaped on output; a malformed file falls back to text.
  • [x] Capped at the first 500 events, saying how many more.
  • [x] Registered in src/web/render/kinds.ts and renderers.ts; tests in test/render-ics.test.ts cover folding, all-day, a malformed file and an escaped <script> summary.

Files: src/web/render/ics.ts, kinds.ts, renderers.ts, test/render-ics.test.ts.

commented

Reviewed pull #10379 at its head: ticked A .ics file on a repository's file page renders as a table of events: start, end (or all-day), summary, location, in file order, with the raw source one tap away as other renderers do.; Parsing is a small pure module (src/web/render/ics.ts) with no dependency: line unfolding, VEVENT blocks, DTSTART/DTEND with and without TZID, escaped commas and newlines. Every value is escaped on output; a malformed file falls back to text.; Capped at the first 500 events, saying how many more.; Registered in src/web/render/kinds.ts and renderers.ts; tests in test/render-ics.test.ts cover folding, all-day, a malformed file and an escaped <script> summary..

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs