flagon-io/g1t

public

Where people and agents ship software together. The open-source git platform for the whole job: issues, agents, checks and deploys to the edge.

g1t/apps/web/app/routes/repo/tree.tsx

20 lines742 bytesCodeBlame

Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.

Initial g1t: services, event bus, intents and attempts1import type { Route } from "./+types/tree";
2import { TreeView } from "../../components/repo-view";
Rust repos service with shipping; pull requests kept in the model3import { repos } from "../../lib/services.server";
Initial g1t: services, event bus, intents and attempts4import { getViewer, unwrap } from "../../lib/session.server";
5
6export function meta({ params }: Route.MetaArgs) {
7 const path = params["*"] ? `${params["*"]} · ` : "";
8 return [{ title: `${path}${params.owner}/${params.repo} · g1t` }];
9}
10
11export async function loader({ params, context }: Route.LoaderArgs) {
12 const path = { namespace: params.owner, name: params.repo };
13 return unwrap(
Rust repos service with shipping; pull requests kept in the model14 await repos.tree(path, getViewer(context), params.ref, params["*"] ?? ""),
Initial g1t: services, event bus, intents and attempts15 );
16}
17
18export default function Tree({ loaderData }: Route.ComponentProps) {
19 return <TreeView tree={loaderData} />;
20}