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.

g1t.sh
25 linesCodeBlameRaw

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.

Teams and CODEOWNERS, labels and milestones, dependency updates, the security suite, and a clearer top bar1/**
2 * "Set up code scanning": commits the starter workflow on a new branch as
3 * the person asking and opens it as their pull request, then goes to it.
4 * It changes the repository's workflows: Maintain, as settings do.
5 */
6import { redirect } from "react-router";
7
8import type { Route } from "./+types/security-code-setup";
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.9import { refusal } from "../../lib/access.server";
Teams and CODEOWNERS, labels and milestones, dependency updates, the security suite, and a clearer top bar10import { setupCodeScanning } from "../../lib/security-suite.server";
11import { assertSameOrigin, requireUser } from "../../lib/session.server";
12
13export async function action({ request, params, context }: Route.ActionArgs) {
14 assertSameOrigin(request);
15 const user = requireUser(context, request);
16 const refused = await refusal(context, params, "manage_settings");
17 if (refused) return { error: refused };
18 const opened = await setupCodeScanning(user, { namespace: params.owner, name: params.repo });
19 if (!opened.ok) return { error: opened.message };
20 throw redirect(`/${params.owner}/${params.repo}/pull/${opened.number}`);
21}
22
23export async function loader({ params }: Route.LoaderArgs) {
24 throw redirect(`/${params.owner}/${params.repo}/security/code-scanning`);
25}

This file's history is long; its oldest lines are credited to the oldest commit read.