Open History to see the last commit
1import { SourceControlProviderKind } from "@t3tools/contracts";
2import { assert, it } from "@effect/vitest";
3import * as NodeServices from "@effect/platform-node/NodeServices";
4import * as DateTime from "effect/DateTime";
5import * as Deferred from "effect/Deferred";
6import * as Effect from "effect/Effect";
7import * as Fiber from "effect/Fiber";
8import * as Layer from "effect/Layer";
9import * as Option from "effect/Option";
10import * as PlatformError from "effect/PlatformError";
11import * as PubSub from "effect/PubSub";
12import * as Redacted from "effect/Redacted";
13import * as Stream from "effect/Stream";
14import * as TestClock from "effect/testing/TestClock";
15import { HttpClient } from "effect/http";
16import { ChildProcessSpawner } from "effect/process";
17import {
18 DEFAULT_SERVER_SETTINGS,
19 VcsProcessSpawnError,
20 VcsProcessTimeoutError,
21 VcsRepositoryDetectionError,
22} from "@t3tools/contracts";
23
24import * as ServerSettings from "../serverSettings.ts";
25import * as ServerConfig from "../config.ts";
26import type * as VcsDriver from "../vcs/VcsDriver.ts";
27import * as VcsDriverRegistry from "../vcs/VcsDriverRegistry.ts";
28import * as VcsProcess from "../vcs/VcsProcess.ts";
29import * as AzureDevOpsCli from "@t3tools/source-control-azure-devops/server/AzureDevOpsCli";
30import * as AzureDevOpsPullRequestCli from "@t3tools/source-control-azure-devops/server/AzureDevOpsPullRequestCli";
31import * as BitbucketApi from "@t3tools/source-control-bitbucket/server/BitbucketApi";
32import * as BitbucketPullRequestApi from "@t3tools/source-control-bitbucket/server/BitbucketPullRequestApi";
33import * as GitVcsDriver from "../vcs/GitVcsDriver.ts";
34import * as GitHubRest from "@t3tools/source-control-github/server/GitHubRest";
35import * as GitHubRequestPolicy from "@t3tools/source-control-github/server/GitHubRequestPolicy";
36import * as GitHubPullRequestApi from "@t3tools/source-control-github/server/GitHubPullRequestApi";
37import * as GitHubCredentials from "@t3tools/source-control-github/server/GitHubCredentials";
38import * as GitLabCli from "@t3tools/source-control-gitlab/server/GitLabCli";
39import * as GitLabPullRequestCli from "@t3tools/source-control-gitlab/server/GitLabPullRequestCli";
40import * as ForgejoCli from "@t3tools/source-control-forgejo/server/ForgejoCli";
41import * as GitCafeApi from "@t3tools/source-control-gitcafe/server/GitCafeApi";
42import * as GitCafeCredentials from "@t3tools/source-control-gitcafe/server/GitCafeCredentials";
43import * as SourceControlProviderRegistry from "./SourceControlProviderRegistry.ts";
44import * as ServerSourceControlHost from "./ServerSourceControlHost.ts";
45
46const TEST_EPOCH = DateTime.makeUnsafe("1970-01-01T00:00:00.000Z");
47
48const processOutput = (
49 stdout: string,
50 options?: {
51 readonly stderr?: string;
52 readonly exitCode?: ChildProcessSpawner.ExitCode;
53 },
54): VcsProcess.VcsProcessOutput => ({
55 exitCode: options?.exitCode ?? ChildProcessSpawner.ExitCode(0),
56 stdout,
57 stderr: options?.stderr ?? "",
58 stdoutTruncated: false,
59 stderrTruncated: false,
60});
61
62function makeRegistry(input: {
63 readonly remotes: ReadonlyArray<{
64 readonly name: string;
65 readonly url: string;
66 }>;
67 readonly process?: Partial<VcsProcess.VcsProcess["Service"]>;
68 readonly githubApi?: Partial<GitHubRest.GitHubRest["Service"]>;
69 readonly gitlab?: Partial<GitLabCli.GitLabCli["Service"]>;
70 readonly forgejo?: Partial<ForgejoCli.ForgejoCli["Service"]>;
71 readonly settings?: Partial<ServerSettings.ServerSettingsService["Service"]>;
72 readonly resolve?: VcsDriverRegistry.VcsDriverRegistry["Service"]["resolve"];
73}) {
74 const driver = {
75 listRemotes: () =>
76 Effect.succeed({
77 remotes: input.remotes.map((remote) => ({
78 ...remote,
79 pushUrl: Option.none(),
80 isPrimary: remote.name === "origin",
81 })),
82 freshness: {
83 source: "live-local" as const,
84 observedAt: TEST_EPOCH,
85 expiresAt: Option.none(),
86 },
87 }),
88 } satisfies Partial<VcsDriver.VcsDriver["Service"]>;
89
90 const layerRegistry = Layer.mock(VcsDriverRegistry.VcsDriverRegistry)({
91 get: () => Effect.succeed(driver as unknown as VcsDriver.VcsDriver["Service"]),
92 resolve:
93 input.resolve ??
94 (() =>
95 Effect.succeed({
96 kind: "git",
97 repository: {
98 kind: "git",
99 rootPath: "/repo",
100 metadataPath: null,
101 freshness: {
102 source: "live-local" as const,
103 observedAt: TEST_EPOCH,
104 expiresAt: Option.none(),
105 },
106 },
107 driver: driver as unknown as VcsDriver.VcsDriver["Service"],
108 })),
109 });
110
111 const layerProcess = Layer.mock(VcsProcess.VcsProcess)({
112 run: () => Effect.succeed(processOutput("")),
113 ...input.process,
114 });
115
116 return SourceControlProviderRegistry.make.pipe(
117 Effect.provide(
118 Layer.mergeAll(
119 NodeServices.layer,
120 layerRegistry,
121 layerProcess,
122 ServerSourceControlHost.layer.pipe(
123 Layer.provide(
124 Layer.mergeAll(
125 layerProcess,
126 layerRegistry,
127 ServerSettings.ServerSettingsService.layerTest(),
128 Layer.mock(GitVcsDriver.GitVcsDriver)({}),
129 ),
130 ),
131 ),
132 Layer.mock(AzureDevOpsCli.AzureDevOpsCli)({}),
133 Layer.mock(AzureDevOpsPullRequestCli.AzureDevOpsPullRequestCli)({}),
134 Layer.mock(BitbucketApi.BitbucketApi)({}),
135 Layer.mock(BitbucketPullRequestApi.BitbucketPullRequestApi)({}),
136 input.settings
137 ? Layer.mock(ServerSettings.ServerSettingsService)(input.settings)
138 : ServerSettings.ServerSettingsService.layerTest(),
139 Layer.mock(GitHubPullRequestApi.GitHubPullRequestApi)({}),
140 // The GitHub provider's GraphQL reads go through these; no test here makes one.
141 Layer.mock(GitHubRequestPolicy.GitHubRequestPolicy)({}),
142 Layer.succeed(
143 HttpClient.HttpClient,
144 HttpClient.make(() => Effect.die(new Error("Unexpected GitHub GraphQL read"))),
145 ),
146 Layer.mock(GitHubRest.GitHubRest)({
147 // No GitHub credential unless a test supplies one, so custom hosts stay unclaimed.
148 credential: (host) => Effect.fail(new GitHubCredentials.GitHubNotSignedInError({ host })),
149 ...input.githubApi,
150 }),
151 Layer.mock(GitVcsDriver.GitVcsDriver)({}),
152 Layer.mock(GitLabCli.GitLabCli)(input.gitlab ?? {}),
153 Layer.mock(GitLabPullRequestCli.GitLabPullRequestCli)({}),
154 Layer.mock(ForgejoCli.ForgejoCli)({
155 listLogins: () => Effect.succeed([]),
156 ...input.forgejo,
157 }),
158 Layer.mock(GitCafeApi.GitCafeApi)({}),
159 Layer.mock(GitCafeCredentials.GitCafeCredentials)({
160 cliEnv: () => Effect.succeed({}),
161 }),
162 ServerConfig.layerTest(process.cwd(), {
163 prefix: "t3-source-control-registry-test-",
164 }).pipe(Layer.provide(NodeServices.layer)),
165 ),
166 ),
167 );
168}
169
170it.effect("routes GitHub remotes to the GitHub provider", () =>
171 Effect.gen(function* () {
172 const registry = yield* makeRegistry({
173 remotes: [{ name: "origin", url: "git@github.com:pingdotgg/t3code.git" }],
174 });
175
176 const provider = yield* registry.resolve({ cwd: "/repo" });
177
178 assert.strictEqual(provider.kind, "github");
179 }),
180);
181
182it.effect("routes directly by provider kind for remote-first workflows", () =>
183 Effect.gen(function* () {
184 const registry = yield* makeRegistry({
185 remotes: [],
186 });
187
188 const provider = yield* registry.get(SourceControlProviderKind.make("github"));
189
190 assert.strictEqual(provider.kind, "github");
191 }),
192);
193
194it.effect("includes the request cwd when an unregistered provider is used", () =>
195 Effect.gen(function* () {
196 const registry = yield* makeRegistry({ remotes: [] });
197 const provider = yield* registry.get(SourceControlProviderKind.make("unknown"));
198
199 const error = yield* provider
200 .getChangeRequest({ cwd: "/repo", reference: "#42" })
201 .pipe(Effect.flip);
202
203 assert.strictEqual(error.provider, "unknown");
204 assert.strictEqual(error.operation, "getChangeRequest");
205 assert.strictEqual(error.cwd, "/repo");
206 assert.strictEqual(error.reference, "#42");
207 }),
208);
209
210it.effect("retains VCS detection failures with structured cwd context", () =>
211 Effect.gen(function* () {
212 const cause = new VcsRepositoryDetectionError({
213 operation: "resolve",
214 cwd: "/repo",
215 detail: "raw VCS detection failure",
216 cause: new Error("raw nested failure"),
217 });
218 const registry = yield* makeRegistry({
219 remotes: [],
220 resolve: () => Effect.fail(cause),
221 });
222
223 const error = yield* registry.resolve({ cwd: "/repo" }).pipe(Effect.flip);
224
225 assert.strictEqual(error.provider, "unknown");
226 assert.strictEqual(error.operation, "detectProvider");
227 assert.strictEqual(error.cwd, "/repo");
228 assert.strictEqual(error.detail, "Failed to detect source control provider.");
229 assert.strictEqual(error.cause, cause);
230 assert.equal(error.message.includes(cause.message), false);
231 }),
232);
233
234it.effect("routes GitLab remotes to the GitLab provider", () =>
235 Effect.gen(function* () {
236 const registry = yield* makeRegistry({
237 remotes: [{ name: "origin", url: "git@gitlab.com:group/project.git" }],
238 });
239
240 const provider = yield* registry.resolve({ cwd: "/repo" });
241
242 assert.strictEqual(provider.kind, "gitlab");
243 }),
244);
245
246it.effect("routes authenticated self-hosted GitLab remotes without relying on host naming", () =>
247 Effect.gen(function* () {
248 const registry = yield* makeRegistry({
249 remotes: [{ name: "origin", url: "https://self-hosted.example.test/group/project.git" }],
250 process: {
251 run: () =>
252 Effect.succeed(
253 processOutput(
254 `gitlab.com
255 x gitlab.com: API call failed: 401 Unauthorized
256 ! No token found
257self-hosted.example.test
258 ✓ Logged in to self-hosted.example.test as gitlab-user
259 ✓ Token found: ******
260`,
261 { exitCode: ChildProcessSpawner.ExitCode(1) },
262 ),
263 ),
264 },
265 });
266
267 const provider = yield* registry.resolve({ cwd: "/repo" });
268
269 assert.strictEqual(provider.kind, "gitlab");
270 }),
271);
272
273it.effect("refines the caller-selected remote instead of choosing another configured remote", () =>
274 Effect.gen(function* () {
275 const registry = yield* makeRegistry({
276 remotes: [{ name: "origin", url: "git@github.com:fork/project.git" }],
277 process: {
278 run: () =>
279 Effect.succeed(
280 processOutput(`self-hosted.example.test
281 ✓ Logged in to self-hosted.example.test as gitlab-user
282`),
283 ),
284 },
285 });
286
287 const handle = yield* registry.resolveHandle({
288 cwd: "/repo",
289 context: {
290 provider: {
291 kind: SourceControlProviderKind.make("unknown"),
292 name: "self-hosted.example.test",
293 baseUrl: "https://self-hosted.example.test",
294 },
295 remoteName: "upstream",
296 remoteUrl: "https://self-hosted.example.test/group/project.git",
297 },
298 });
299
300 assert.strictEqual(handle.context?.provider.kind, "gitlab");
301 assert.strictEqual(handle.context?.remoteName, "upstream");
302 }),
303);
304
305it.effect("routes authenticated self-hosted GitLab remotes on non-standard ports", () =>
306 Effect.gen(function* () {
307 const registry = yield* makeRegistry({
308 remotes: [{ name: "origin", url: "https://self-hosted.example.test:8443/group/project.git" }],
309 process: {
310 run: () =>
311 Effect.succeed(
312 processOutput(
313 `self-hosted.example.test:8443
314 ✓ Logged in to self-hosted.example.test:8443 as gitlab-user
315 ✓ Token found: ******
316`,
317 ),
318 ),
319 },
320 });
321
322 const provider = yield* registry.resolve({ cwd: "/repo" });
323
324 assert.strictEqual(provider.kind, "gitlab");
325 }),
326);
327
328it.effect("routes Bitbucket remotes to the Bitbucket provider", () =>
329 Effect.gen(function* () {
330 const registry = yield* makeRegistry({
331 remotes: [{ name: "origin", url: "git@bitbucket.org:pingdotgg/t3code.git" }],
332 });
333
334 const provider = yield* registry.resolve({ cwd: "/repo" });
335
336 assert.strictEqual(provider.kind, "bitbucket");
337 }),
338);
339
340it.effect("routes Azure DevOps remotes to the Azure DevOps provider", () =>
341 Effect.gen(function* () {
342 const registry = yield* makeRegistry({
343 remotes: [{ name: "origin", url: "https://dev.azure.com/acme/project/_git/repo" }],
344 });
345
346 const provider = yield* registry.resolve({ cwd: "/repo" });
347
348 assert.strictEqual(provider.kind, "azure-devops");
349 }),
350);
351
352it.effect("falls back to a non-origin remote when origin is not configured", () =>
353 Effect.gen(function* () {
354 const registry = yield* makeRegistry({
355 remotes: [{ name: "upstream", url: "https://dev.azure.com/acme/project/_git/repo" }],
356 });
357
358 const provider = yield* registry.resolve({ cwd: "/repo" });
359
360 assert.strictEqual(provider.kind, "azure-devops");
361 }),
362);
363
364it.effect(
365 "routes linked subjects by URL independently of the checkout and skips unsupported links",
366 () =>
367 Effect.gen(function* () {
368 const registry = yield* makeRegistry({
369 remotes: [{ name: "origin", url: "https://github.com/unrelated/checkout.git" }],
370 githubApi: {
371 rest: () =>
372 Effect.succeed({
373 status: 200,
374 headers: {},
375 body: JSON.stringify({ title: "GitHub issue", body: null }),
376 truncated: false,
377 invalidUtf8: false,
378 }),
379 },
380 gitlab: {
381 execute: () =>
382 Effect.succeed(
383 processOutput(JSON.stringify({ title: "GitLab MR", description: "Nested project" })),
384 ),
385 },
386 });
387 for (const [url, expected] of [
388 ["https://github.com/team/project/issues/1", { title: "GitHub issue", body: null }],
389 [
390 "https://gitlab.com/team/sub/project/-/merge_requests/2",
391 { title: "GitLab MR", body: "Nested project" },
392 ],
393 ] as const) {
394 const lookup = registry.resolveLink({ cwd: "/unrelated", url: new URL(url) });
395 assert.ok(lookup);
396 assert.deepStrictEqual(yield* lookup, expected);
397 }
398 for (const url of [
399 "https://example.test/team/project/issues/1",
400 "https://github.attacker.test/team/project/issues/1",
401 "https://gitlab.attacker.test/team/project/-/issues/1",
402 "https://github.com/team/project",
403 "https://codeberg.org/team/project/issues/1",
404 "https://bitbucket.org/team/project/pull-requests/1",
405 "https://dev.azure.com/org/project/_git/repo/pullrequest/1",
406 "http://github.com/team/project/issues/1",
407 "https://user:secret@github.com/team/project/issues/1",
408 ]) {
409 assert.strictEqual(
410 registry.resolveLink({ cwd: "/unrelated", url: new URL(url) }),
411 undefined,
412 );
413 }
414 }).pipe(Effect.scoped),
415);
416
417it.effect.each([
418 { name: "a credential", credential: "found", expected: "github" },
419 // Claimed so the error says the host is turned off, not that it is unsupported.
420 { name: "a host turned off in Settings", credential: "disabled", expected: "github" },
421 { name: "no credential", credential: "missing", expected: "unknown" },
422] as const)("resolves custom-host remotes with $name", (scenario) =>
423 Effect.gen(function* () {
424 const hosts: Array<string> = [];
425 const commands: Array<string> = [];
426 const registry = yield* makeRegistry({
427 remotes: [{ name: "origin", url: "git@code.example.test:team/project.git" }],
428 process: {
429 run: ({ command }) => {
430 commands.push(command);
431 return Effect.succeed(processOutput(""));
432 },
433 },
434 githubApi: {
435 credential: (host) => {
436 hosts.push(host);
437 return scenario.credential === "found"
438 ? Effect.succeed({ token: Redacted.make("token"), fingerprint: `${host}:fingerprint` })
439 : scenario.credential === "disabled"
440 ? Effect.fail(new GitHubCredentials.GitHubHostDisabledError({ host }))
441 : Effect.fail(new GitHubCredentials.GitHubNotSignedInError({ host }));
442 },
443 },
444 });
445 const handle = yield* registry.resolveHandle({ cwd: "/repo" });
446 assert.strictEqual(handle.provider.kind, SourceControlProviderKind.make(scenario.expected));
447 assert.strictEqual(handle.context?.provider.baseUrl, "https://code.example.test");
448 assert.deepStrictEqual(hosts, ["code.example.test"]);
449 // Recognition goes through the credential layer; gh is only one of its sources.
450 assert.notInclude(commands, "gh");
451 }),
452);
453
454it.effect("skips GitHub discovery for the identity resolver's empty base URL", () =>
455 Effect.gen(function* () {
456 const hosts: string[] = [];
457 const remoteUrl = "git@githubenterprise.dev.example.com:team/workspace.git";
458 const registry = yield* makeRegistry({
459 remotes: [{ name: "origin", url: remoteUrl }],
460 githubApi: {
461 credential: (host) => {
462 hosts.push(host);
463 return Effect.succeed({
464 token: Redacted.make("token"),
465 fingerprint: `${host}:fingerprint`,
466 });
467 },
468 },
469 });
470 const context = {
471 provider: { kind: SourceControlProviderKind.make("unknown"), name: "Unknown", baseUrl: "" },
472 remoteName: "origin",
473 remoteUrl,
474 };
475 const unresolved = yield* registry.resolveHandle({ cwd: "/repo", context });
476 assert.deepStrictEqual(unresolved.context, context);
477 assert.deepStrictEqual(hosts, []);
478
479 const resolved = yield* registry.resolveHandle({ cwd: "/repo" });
480 assert.strictEqual(resolved.provider.kind, "github");
481 assert.strictEqual(
482 resolved.context?.provider.baseUrl,
483 "https://githubenterprise.dev.example.com",
484 );
485 assert.deepStrictEqual(hosts, ["githubenterprise.dev.example.com"]);
486 }),
487);
488
489const notFound = (command: string, cwd: string) =>
490 new VcsProcessSpawnError({
491 operation: "test",
492 command,
493 cwd,
494 cause: PlatformError.systemError({ _tag: "NotFound", module: "ChildProcess", method: "spawn" }),
495 });
496
497const resolveUnknown = (
498 registry: SourceControlProviderRegistry.SourceControlProviderRegistry["Service"],
499 repository: string,
500) =>
501 registry.resolveHandle({
502 cwd: `/${repository}`,
503 context: {
504 provider: {
505 kind: SourceControlProviderKind.make("unknown"),
506 name: "git.example.internal",
507 baseUrl: "https://git.example.internal",
508 },
509 remoteName: "origin",
510 remoteUrl: `git@Git.Example.Internal:team/${repository}.git`,
511 },
512 });
513
514it.effect("asks once for every checkout of a server no integration claims", () =>
515 Effect.gen(function* () {
516 const asked: Array<string> = [];
517 const release = yield* Deferred.make<void>();
518 const registry = yield* makeRegistry({
519 remotes: [],
520 process: {
521 run: ({ command, args, cwd }) => {
522 asked.push([command, ...args].join(" "));
523 return Deferred.await(release).pipe(Effect.andThen(Effect.fail(notFound(command, cwd))));
524 },
525 },
526 githubApi: {
527 credential: (host) => {
528 asked.push(`credential ${host}`);
529 return Effect.fail(new GitHubCredentials.GitHubNotSignedInError({ host }));
530 },
531 },
532 forgejo: {
533 listLogins: ({ command = "tea", cwd }) => {
534 asked.push(command);
535 const cause = notFound(command, cwd);
536 return Effect.fail(new ForgejoCli.ForgejoCliError({ command, cwd, detail: "", cause }));
537 },
538 },
539 });
540
541 // Three checkouts read while the first probe is still running share it.
542 const started = yield* Effect.forEach(["a", "b", "c"], () => Deferred.make<void>());
543 const callers = yield* Effect.forEach(
544 ["a", "b", "c"],
545 (repository, index) =>
546 Deferred.succeed(started[index]!, undefined).pipe(
547 Effect.andThen(resolveUnknown(registry, repository)),
548 ),
549 { concurrency: "unbounded" },
550 ).pipe(Effect.forkChild);
551 yield* Effect.forEach(started, Deferred.await);
552 yield* Deferred.succeed(release, undefined);
553 const handles = yield* Fiber.join(callers);
554 yield* resolveUnknown(registry, "d");
555 assert.deepStrictEqual(
556 handles.map((handle) => handle.provider.kind),
557 ["unknown", "unknown", "unknown"],
558 );
559 const once = asked.slice();
560 // glab is asked about the remote's host as the remote spells it.
561 assert.sameMembers(once, [
562 "credential git.example.internal",
563 "glab auth status --hostname Git.Example.Internal",
564 "fj",
565 "tea",
566 ]);
567
568 // A login made in a terminal sends no signal, so the server is asked again later.
569 yield* TestClock.adjust("5 minutes");
570 yield* resolveUnknown(registry, "a");
571 assert.deepStrictEqual(asked, [...once, ...once]);
572 }),
573);
574
575it.effect("asks again after a check that could not answer", () =>
576 Effect.gen(function* () {
577 let asks = 0;
578 const registry = yield* makeRegistry({
579 remotes: [],
580 process: {
581 run: ({ command, cwd }) => {
582 asks += 1;
583 return Effect.fail(
584 new VcsProcessTimeoutError({ operation: "test", command, cwd, timeoutMs: 1 }),
585 );
586 },
587 },
588 });
589 yield* resolveUnknown(registry, "a");
590 yield* resolveUnknown(registry, "b");
591 assert.strictEqual(asks, 2);
592 }),
593);
594
595it.effect("asks again once Settings change", () =>
596 Effect.gen(function* () {
597 const changes = yield* PubSub.unbounded<typeof DEFAULT_SERVER_SETTINGS>();
598 const handled = yield* Deferred.make<void>();
599 let signedIn = false;
600 const registry = yield* makeRegistry({
601 remotes: [],
602 settings: {
603 subscribeChanges: PubSub.subscribe(changes).pipe(
604 Effect.map((subscription) =>
605 // A change is handled once the registry asks for the next one.
606 Stream.fromSubscription(subscription).pipe(
607 Stream.flatMap((settings) =>
608 Stream.concat(
609 Stream.make(settings),
610 Stream.fromEffectDrain(Deferred.succeed(handled, undefined)),
611 ),
612 ),
613 ),
614 ),
615 ),
616 },
617 process: { run: ({ command, cwd }) => Effect.fail(notFound(command, cwd)) },
618 githubApi: {
619 credential: (host) =>
620 signedIn
621 ? Effect.succeed({ token: Redacted.make("token"), fingerprint: `${host}:fingerprint` })
622 : Effect.fail(new GitHubCredentials.GitHubNotSignedInError({ host })),
623 },
624 });
625 assert.strictEqual((yield* resolveUnknown(registry, "a")).provider.kind, "unknown");
626 signedIn = true;
627 assert.strictEqual((yield* resolveUnknown(registry, "b")).provider.kind, "unknown");
628
629 // A token saved for the host in Settings.
630 yield* PubSub.publish(changes, DEFAULT_SERVER_SETTINGS);
631 yield* Deferred.await(handled);
632 assert.strictEqual((yield* resolveUnknown(registry, "c")).provider.kind, "github");
633 }),
634);