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

Docs: the inbox, what lands in it and why, its tabs and actions1import assert from "node:assert/strict";
2import { test } from "node:test";
3
4import { workOwner } from "../../../../packages/contracts/src/work.ts";
Merge branch 'worktree-agent-a7823ad540eb3433b'5import { openedBy } from "./opened-by.ts";
Docs: the inbox, what lands in it and why, its tabs and actions6
7const syntaqx = { id: "usr_1", username: "syntaqx" };
8const g1t = { id: "usr_g1t_agent", username: "g1t", kind: "agent" as const };
9
10test("a pull request g1t made shows g1t, requested by whoever asked", () => {
Merge branch 'worktree-agent-a7823ad540eb3433b'11 const pull = { author: g1t, requestedBy: syntaqx };
Docs: the inbox, what lands in it and why, its tabs and actions12 assert.deepEqual(openedBy(pull), { name: "g1t", requestedBy: "syntaqx" });
13 // It is theirs to manage, as their own would be.
14 assert.equal(workOwner(pull).id, "usr_1");
15});
16
17test("anything else shows its author", () => {
18 // Someone's own agent.
19 assert.deepEqual(openedBy({ author: syntaqx, requestedBy: null }), { name: "syntaqx", requestedBy: null });
20 assert.equal(workOwner({ author: syntaqx, requestedBy: null }).id, "usr_1");
21});
22
23test("work g1t started itself names nobody as asking", () => {
24 const pull = { author: { id: "g1t", username: "g1t", kind: "system" as const }, requestedBy: null };
25 assert.deepEqual(openedBy(pull), { name: "g1t", requestedBy: null });
26 assert.equal(workOwner(pull).username, "g1t");
27});

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