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
14 linesCodeBlameRaw
1import 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 * Who opened an issue or a pull request, and who asked g1t for it, as
8 * stored: g1t for what it made or filed, with the person it was for as
9 * `requestedBy`; anyone else's, theirs alone. Who may change it is the
10 * same pair read the other way round: `workOwner` in the contracts.
11 */
12export function openedBy(item: Pick<Pull, "author" | "requestedBy">): { name: string; requestedBy: string | null } {
13 return { name: item.author.username, requestedBy: item.requestedBy?.username ?? null };
14}