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

An admin marks a repository as a template for new forges, and the mark is listed in one place #12431

shipped production is serving it opened this has it

Landed in pull #12498 · run

opened this

Intent: a new forge can start from a template its maker picks (P14); this is the first piece, the mark alone.

Done when:

Files: src/core/repos.ts, its migration, the repository settings page, one existing MCP tool, test/repo-template-flag.test.ts. Avoid src/http/server.ts unless a route is truly needed; extend the existing API router file. Risks: a private repository leaking into the list; keep the visibility check the one the repo page uses.

commented

Reviewed pull #12498 at its head: ticked A repository has a template flag stored with the repository's other settings (follow how a setting such as visibility is stored and migrated; add one migration, no new table).; Only a person who administers the repository can set or clear it, same-origin POST, validated at the boundary; an agent session is refused in the usual words.; A page control on the repository settings and the same action on an existing MCP tool (action/kind, not a new tool; run bun test test/mcp-size.test.ts) set it with the same words and a receipt.; GET of the list of template repositories (API) returns only repositories the reader may see.; test/repo-template-flag.test.ts covers set, clear, the refused agent, and a private repository absent from another person's list..

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs