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.

Commit

Contracts: the work client imports only types

Values imported from ./work without an extension broke Node's test runner; the helper that needed one lives in clients.ts now.

G1T-Session:
ses_01m56adwzvenhby748vvbn96c5
syntaqxcommitted Parentb2e5349Browse files
2 files+8−80/2 viewed
+8−1
99 import type { PackagesApi } from "./packages";
1010 import type { WebhooksApi } from "./webhooks";
1111 import type { RepoPath, ReposApi } from "./repos";
12−import { threadArgs, type CommentScope, type PullDetail, type WorkApi } from "./work";
12+import type { CommentScope, PullDetail, Thread, WorkApi } from "./work";
1313 import type { Result } from "./result";
1414 import type { RunnersAdminApi, RunnersApi } from "./runners";
1515
3939 return (await response.json()) as T;
4040 }
4141
42+/** The thread's fields as the work service reads them. */
43+function threadArgs(thread: Thread): { repo: RepoPath | null; workspace: string; number: number } {
44+ return "repo" in thread
45+ ? { repo: thread.repo, workspace: "", number: thread.number }
46+ : { repo: null, workspace: thread.workspace, number: thread.number };
47+}
48+
4249 export function identityClient(service: ServiceBinding): IdentityApi {
4350 const call = <T>(method: string, args: object) => rpc<T>(service, method, args);
4451 return {
+0−7
127127 */
128128 export type Thread = { repo: RepoPath; number: number } | { workspace: string; number: number };
129129
130−/** The thread's fields as the work service reads them. */
131−export function threadArgs(thread: Thread): { repo: RepoPath | null; workspace: string; number: number } {
132− return "repo" in thread
133− ? { repo: thread.repo, workspace: "", number: thread.number }
134− : { repo: null, workspace: thread.workspace, number: thread.number };
135−}
136−
137130 /**
138131 * A label of a workspace: a name, a color and what it means. Work items and
139132 * the pull requests of its repositories carry labels by name; names are

Comments

Sign in to comment.