Skip to content

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

7 linesCodeBlameRaw
1export const BUILD_HEADER = "x-g1t-build";
2
3/** Only safe route reads can switch builds automatically; never replay writes. */
4export function needsBuildRefresh(request: Request, build: string): boolean {
5 const requested = request.headers.get(BUILD_HEADER);
6 return request.method === "GET" && new URL(request.url).pathname.endsWith(".data") && requested !== null && requested !== build;
7}