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.
| Inbox: a bell in the top bar opens it beside the page, and /inbox holds it all | 1 | import { env } from "cloudflare:workers"; |
| 2 | ||
| 3 | import { githubAppClient, githubSignInClient } from "@g1t/contracts"; | |
| 4 | ||
| 5 | import { instrumented } from "./perf.server"; | |
| 6 | ||
| 7 | /** Signing in with GitHub, kept by the identity service. */ | |
| 8 | export const githubSignIn = githubSignInClient(instrumented("identity", env.IDENTITY)); | |
| Merge main into rm-agents: mirroring removal, open signups, free-tier limits, the g1t CLI and runner fixes, with the agent removal kept. The CLI's table of operations is regenerated from the API without the agent, customize and AI credit operations; no CLI command used them. | 9 | /** g1t's GitHub App: installations and imports, kept by integrations. */ |
| Inbox: a bell in the top bar opens it beside the page, and /inbox holds it all | 10 | export const githubApp = githubAppClient(instrumented("integrations", env.INTEGRATIONS)); |
| 11 | ||
| 12 | /** | |
| 13 | * Whether this g1t offers signing in with GitHub. False when no app is | |
| 14 | * configured, or identity cannot say: the button is then left out. | |
| 15 | */ | |
| 16 | export async function githubSignInEnabled(): Promise<boolean> { | |
| 17 | return githubSignIn.enabled().catch(() => false); | |
| 18 | } | |
| 19 | ||
| 20 | /** Where GitHub returns after sign-in: registered on the app, exactly. */ | |
| 21 | export function callbackUrl(request: Request): string { | |
| 22 | return `${new URL(request.url).origin}/auth/github/callback`; | |
| 23 | } |
This file's history is long; its oldest lines are credited to the oldest commit read.