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
22 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.

The docs' Copy page menu keeps its own spacing, with an icon per item1import type { Pull } from "@g1t/contracts";
2
3/** g1t's own name: its agent's, and the system's. */
4export const G1T = "g1t";
5
6/**
7 * Whether g1t's own agent made a pull request: in a fork of its own, not
8 * on a branch someone pushed.
9 */
10export function madeByG1t(pull: Pick<Pull, "agent" | "branch">): boolean {
11 return pull.agent === G1T && !pull.branch;
12}
13
14/**
15 * Who opened an issue or a pull request, and who asked g1t for it, as
16 * stored: g1t for what it made or filed, with the person it was for as
17 * `requestedBy`; anyone else's, theirs alone. Who may change it is the
18 * same pair read the other way round: `workOwner` in the contracts.
19 */
20export function openedBy(item: Pick<Pull, "author" | "requestedBy">): { name: string; requestedBy: string | null } {
21 return { name: item.author.username, requestedBy: item.requestedBy?.username ?? null };
22}

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