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.

29 linesCodeBlameRaw
1/**
2 * Where Work's cycle pages are, apart from lib/cycles.ts so the sidebar
3 * (components/shell.tsx) links to them without bringing the cycle page's
4 * figures into every page.
5 */
6import { workPath } from "./work-items.ts";
7
8/** The current cycle's page, or a numbered cycle's. */
9export function cyclePath(workspace: string, number?: number): string {
10 return number == null ? workPath(workspace, "cycle") : workPath(workspace, `cycles/${number}`);
11}
12
13/** Planning the next cycle: Next beside the coming cycle. */
14export function cyclePlanPath(workspace: string): string {
15 return workPath(workspace, "cycle/plan");
16}
17
18/** Where Work's sidebar reads the current cycle. */
19export function cycleJsonPath(workspace: string): string {
20 return workPath(workspace, "cycle.json");
21}
22
23/** Work's settings, where cycles are turned on. */
24export function workSettingsPath(workspace: string): string {
25 return `/${workspace.toLowerCase()}/-/settings/work`;
26}
27
28/** The sidebar's row: the current cycle in a few words (lib/cycles.ts `sidebarCycle`). */
29export type SidebarCycle = { number: number; left: string; done: number; scope: number; state: "upcoming" | "running" | "closed" };