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
30 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 runner base keeps its old comment, so the pushed base image still matches its folder1import { test } from "node:test";
2import assert from "node:assert/strict";
3
4import { effectiveDescription, ownDescription } from "./description.ts";
5
6test("a project without its own description shows its repository's, as it is now", () => {
7 assert.deepEqual(effectiveDescription({ description: null, repo_description: "Git for agents" }), {
8 description: "Git for agents",
9 inherited: true,
10 });
11 assert.deepEqual(effectiveDescription({ description: null, repo_description: null }), { description: null, inherited: true });
12 assert.deepEqual(effectiveDescription({ description: null }), { description: null, inherited: true });
13});
14
15test("its own description wins over the repository's", () => {
16 assert.deepEqual(effectiveDescription({ description: "The storefront", repo_description: "Monorepo" }), {
17 description: "The storefront",
18 inherited: false,
19 });
20});
21
22test("a change sets its own, clears back to the repository's, or leaves it", () => {
23 assert.equal(ownDescription("Old", undefined), "Old");
24 assert.equal(ownDescription(null, undefined), null);
25 assert.equal(ownDescription("Old", " New "), "New");
26 assert.equal(ownDescription("Old", ""), null);
27 assert.equal(ownDescription("Old", " "), null);
28 assert.equal(ownDescription("Old", null), null);
29 assert.equal(ownDescription(null, "x".repeat(300))?.length, 200);
30});

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