import { loadRepoIndex } from "$lib/api/repoIndex";
import type { PageLoad } from "./$types";

// the ref is a single encoded segment, so `feature/x` arrives here intact
export const load: PageLoad = async (event) => {
	const parent = await event.parent();
	return loadRepoIndex(event, parent, event.params.ref, { requireRef: true });
};
