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

Admins mark repositories as app templates, and New app offers a picker when more than one is marked #10571

shipped production is serving it opened this has it
opened this

Part of #10437 (from the owner's #10305). This builds on #10421, which copies one template repository's tip; this issue lets admins choose which repositories are offered.

Done:

  • [x] A site admin marks or unmarks a repository as an app template (admin settings, and an admin-only API route); the marking is kept in the forge's database. trevato/app-template is marked by default and comes first.
  • [x] New app (web page and terminal screen) shows a picker of the marked templates when more than one is marked and the caller can read it; with one, it shows no picker and behaves as today.
  • [x] A template the caller cannot read is not listed, and choosing it by name is refused (404).
  • [x] Tests: a non-admin cannot mark (403); the picker lists only readable marked templates; the default comes first.

Not this issue: new forges' templates (#7536, P14).

Files: src/core/app_templates.ts (new), src/actions/apps.ts, src/web/pages/apps.ts, src/tui/screens/newapp.ts, test/app_templates.test.ts

commented

Reviewed pull #10634 at its head: ticked A site admin marks or unmarks a repository as an app template (admin settings, and an admin-only API route); the marking is kept in the forge's database. trevato/app-template is marked by default and comes first.; New app (web page and terminal screen) shows a picker of the marked templates when more than one is marked and the caller can read it; with one, it shows no picker and behaves as today.; A template the caller cannot read is not listed, and choosing it by name is refused (404).; Tests: a non-admin cannot mark (403); the picker lists only readable marked templates; the default comes first..

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs