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 plan says what g1t is for without measuring it against other products1import assert from "node:assert/strict";
2import { test } from "node:test";
3
4import { ACCOUNT_SETTINGS, accountSettingsPage, settingsPathForHash } from "./account-settings.ts";
5
6test("every anchor of the old settings page lands on its own page", () => {
7 const cases: [string, string][] = [
8 ["#picture", "/settings/profile"],
9 ["#profile", "/settings/profile"],
10 ["#emails", "/settings/emails"],
11 ["#github", "/settings/github"],
12 ["#ssh-keys", "/settings/keys"],
13 ["#tokens", "/settings/tokens"],
14 ["#applications", "/settings/applications"],
15 ["#security-log", "/settings/security-log"],
16 ];
17 for (const [hash, path] of cases) assert.equal(settingsPathForHash(hash), path, hash);
18 assert.equal(settingsPathForHash(""), null);
19 assert.equal(settingsPathForHash("#nothing"), null);
20});
21
22test("a settings path names its page", () => {
23 for (const page of Object.keys(ACCOUNT_SETTINGS)) {
24 assert.equal(accountSettingsPage(`/settings/${page}`), page);
25 }
26 assert.equal(accountSettingsPage("/settings"), null);
27 assert.equal(accountSettingsPage("/settings/nope"), null);
One kind of access token; presence and status; usernames keep their case; the tour is a miniature of the real app; icons for password managers28 assert.equal(accountSettingsPage("/settings/tokens/tok_1"), "tokens", "a token's page is under Access tokens");
The plan says what g1t is for without measuring it against other products29 assert.equal(accountSettingsPage("/acme/web/settings/domains"), null);
30});

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