Skip to content
36 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.

Teams and CODEOWNERS, labels and milestones, dependency updates, the security suite, and a clearer top bar1// The forms of the milestones pages: create, edit, close or reopen, delete.
2// Each needs the Triage role, which work checks again.
3
4import type { MilestoneResult } from "../components/milestones";
A desktop release goes out with what can be built. Linux is built on g1t's machines in every release; Windows and macOS each wait on a repository variable: a machine registered for them, or for Windows a cross build on Linux once aka.ms and download.visualstudio.microsoft.com are workflow-only domains, which is where the first release stopped. A platform with no machine is skipped and the download page says it is coming, with a word for the visitor whose platform this release lacks. The guide and CONTRIBUTING say so.5import { refusal, requireWritableRepo } from "./access.server";
Teams and CODEOWNERS, labels and milestones, dependency updates, the security suite, and a clearer top bar6import { work } from "./services.server";
7import { assertSameOrigin, requireUser } from "./session.server";
8
9type Context = Parameters<typeof refusal>[0];
10type RepoParams = Parameters<typeof refusal>[1];
11
12export async function milestoneAction(request: Request, params: RepoParams, context: Context): Promise<MilestoneResult> {
13 assertSameOrigin(request);
14 const user = requireUser(context, request);
A desktop release goes out with what can be built. Linux is built on g1t's machines in every release; Windows and macOS each wait on a repository variable: a machine registered for them, or for Windows a cross build on Linux once aka.ms and download.visualstudio.microsoft.com are workflow-only domains, which is where the first release stopped. A platform with no machine is skipped and the download page says it is coming, with a word for the visitor whose platform this release lacks. The guide and CONTRIBUTING say so.15 await requireWritableRepo(context, params);
Teams and CODEOWNERS, labels and milestones, dependency updates, the security suite, and a clearer top bar16 const form = await request.formData();
17 const intent = String(form.get("intent") ?? "");
18 const number = Number(form.get("number")) || undefined;
Merge main (membership, two-factor, GitHub repo roles) into tokens19 const refused = await refusal(context, params, "manage_labels");
Teams and CODEOWNERS, labels and milestones, dependency updates, the security suite, and a clearer top bar20 if (refused) return { intent, number, error: refused };
21 const path = { namespace: params.owner ?? "", name: params.repo ?? "" };
22 const text = (key: string) => (form.has(key) ? String(form.get(key) ?? "") : undefined);
23 if (intent === "delete") {
24 const deleted = await work.deleteMilestone(user, path, number ?? 0);
25 return deleted.ok ? { intent, number } : { intent, number, error: deleted.error.message };
26 }
27 const state = form.get("state");
28 const saved = await work.saveMilestone(user, path, {
29 number: intent === "create" ? undefined : number,
30 title: text("title"),
31 description: text("description"),
32 dueOn: text("dueOn"),
33 state: state === "open" || state === "closed" ? state : undefined,
34 });
35 return saved.ok ? { intent, number: saved.value.number } : { intent, number, error: saved.error.message };
36}

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