Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

AzureDevOpsPullRequestCli.ts

701 lines23.2 KB

1import * as Context from "effect/Context";
2import * as Effect from "effect/Effect";
3import * as Layer from "effect/Layer";
4import * as Result from "effect/Result";
5import * as Schema from "effect/Schema";
6import type {
7 PullRequestAction,
8 PullRequestComment,
9 PullRequestInvolvement,
10 PullRequestListState,
11 PullRequestMergeMethod,
12} from "@t3tools/contracts";
13​
14import * as AzureDevOpsCli from "./AzureDevOpsCli.ts";
15import {
16 decodeItemContentJson,
17 decodeIterationChangesJson,
18 decodeIterationsJson,
19 decodePullRequestJson,
20 decodePullRequestListJson,
21 decodeThreadsJson,
22 decodeViewerJson,
23 type AzureDevOpsChangeEntry,
24 type AzureDevOpsItemContent,
25 type AzureDevOpsIteration,
26 type AzureDevOpsPullRequest,
27 type AzureDevOpsRepositoryLocation,
28} from "./azureDevOpsPullRequestJson.ts";
29import type { ProviderListCursor } from "@t3tools/source-control-core/server/PullRequestProvider";
30​
31export class AzureDevOpsPullRequestReadError extends Schema.TaggedError<AzureDevOpsPullRequestReadError>()(
32 "AzureDevOpsPullRequestReadError",
33 {
34 command: Schema.Literal("az"),
35 cwd: Schema.String,
36 operation: Schema.String,
37 cause: Schema.Defect(),
38 },
39) {
40 get detail(): string {
41 return `Azure CLI returned an unreadable ${this.operation} response.`;
42 }
43​
44 override get message(): string {
45 return `Azure CLI failed in ${this.operation}: ${this.detail}`;
46 }
48​
49export class AzureDevOpsViewerUnavailableError extends Schema.TaggedError<AzureDevOpsViewerUnavailableError>()(
50 "AzureDevOpsViewerUnavailableError",
51 {
52 command: Schema.Literal("az"),
53 cwd: Schema.String,
54 },
55) {
56 get detail(): string {
57 return "Azure CLI could not name the signed-in account. Run `az login` and retry.";
58 }
59​
60 override get message(): string {
61 return `Azure CLI failed in getViewer: ${this.detail}`;
62 }
64​
65export class AzureDevOpsPullRequestIncompleteError extends Schema.TaggedError<AzureDevOpsPullRequestIncompleteError>()(
66 "AzureDevOpsPullRequestIncompleteError",
67 {
68 command: Schema.Literal("az"),
69 cwd: Schema.String,
70 number: Schema.Int,
71 },
72) {
73 get detail(): string {
74 return "Azure DevOps returned no branch or link for the pull request.";
75 }
76​
77 override get message(): string {
78 return `Azure CLI failed in getPullRequest: ${this.detail}`;
79 }
81​
82export class AzureDevOpsReviewerNameError extends Schema.TaggedError<AzureDevOpsReviewerNameError>()(
83 "AzureDevOpsReviewerNameError",
84 {
85 command: Schema.Literal("az"),
86 cwd: Schema.String,
87 },
88) {
89 get detail(): string {
90 return "A reviewer is named by an email address or an identity id.";
91 }
92​
93 override get message(): string {
94 return `Azure CLI failed in setPullRequestReviewers: ${this.detail}`;
95 }
97​
98export type AzureDevOpsPullRequestCliError =
99 | AzureDevOpsCli.AzureDevOpsCliError
100 | AzureDevOpsPullRequestReadError
101 | AzureDevOpsPullRequestIncompleteError
102 | AzureDevOpsReviewerNameError
103 | AzureDevOpsViewerUnavailableError;
104​
105const REST_API_VERSION = "7.1";
106const PULL_REQUEST_LIST_MAX_OUTPUT_BYTES = 16 * 1024 * 1024;
107/** A 2,000-file page exceeds the default 1 MiB output budget. */
108const CHANGE_ENTRIES_MAX_OUTPUT_BYTES = 8 * 1024 * 1024;
109/** JSON escaping and base64 can exceed the decoded file's size. */
110const ITEM_CONTENT_MAX_OUTPUT_BYTES = 4 * 1024 * 1024;
111/** Review history is unpaged and independent of diff size. */
112const REVIEW_HISTORY_MAX_OUTPUT_BYTES = 8 * 1024 * 1024;
113​
114/** Azure's iteration-change page limit. */
115const CHANGE_ENTRIES_PER_PAGE = 2000;
116​
117/** Count raw entries, including folders and malformed rows. */
118const MAX_CHANGE_ENTRIES = 10_000;
119​
120export interface AzureDevOpsIterationChanges {
121 readonly changes: ReadonlyArray<AzureDevOpsChangeEntry>;
122 readonly truncated: boolean;
124​
125export class AzureDevOpsPullRequestCli extends Context.Service<
126 AzureDevOpsPullRequestCli,
127 {
128 readonly getViewer: (input: {
129 readonly cwd: string;
130 }) => Effect.Effect<string, AzureDevOpsPullRequestCliError>;
131​
132 readonly listPullRequests: (input: {
133 readonly cwd: string;
134 readonly repository: string;
135 readonly state: PullRequestListState;
136 readonly involvement: PullRequestInvolvement;
137 readonly viewer: string;
138 readonly limit: number;
139 /** Matched by `--creator`, which takes the email a row shows as its login. */
140 readonly author?: string | undefined;
141 /**
142 * Where to carry on from. Azure has no date filter for a pull request listing, so the only
143 * part of a cursor it can use is how many rows have already been handed over.
144 */
145 readonly cursor?: ProviderListCursor | undefined;
146 }) => Effect.Effect<
147 {
148 readonly items: ReadonlyArray<AzureDevOpsPullRequest>;
149 readonly truncated: boolean;
150 readonly cursorAdvance: number;
151 },
152 AzureDevOpsPullRequestCliError
153 >;
154​
155 readonly getPullRequest: (input: {
156 readonly cwd: string;
157 readonly number: number;
158 }) => Effect.Effect<AzureDevOpsPullRequest, AzureDevOpsPullRequestCliError>;
159​
160 readonly listThreads: (input: {
161 readonly cwd: string;
162 readonly location: AzureDevOpsRepositoryLocation;
163 readonly number: number;
164 }) => Effect.Effect<ReadonlyArray<PullRequestComment>, AzureDevOpsPullRequestCliError>;
165​
166 readonly listIterations: (input: {
167 readonly cwd: string;
168 readonly location: AzureDevOpsRepositoryLocation;
169 readonly number: number;
170 }) => Effect.Effect<ReadonlyArray<AzureDevOpsIteration>, AzureDevOpsPullRequestCliError>;
171​
172 /** Changes cover the whole PR from its merge base. */
173 readonly listIterationChanges: (input: {
174 readonly cwd: string;
175 readonly location: AzureDevOpsRepositoryLocation;
176 readonly number: number;
177 readonly iterationId: number;
178 }) => Effect.Effect<AzureDevOpsIterationChanges, AzureDevOpsPullRequestCliError>;
179​
180 readonly readItemContent: (input: {
181 readonly cwd: string;
182 readonly location: AzureDevOpsRepositoryLocation;
183 readonly path: string;
184 readonly commit: string;
185 }) => Effect.Effect<AzureDevOpsItemContent, AzureDevOpsPullRequestCliError>;
186​
187 readonly runPullRequestAction: (input: {
188 readonly cwd: string;
189 readonly number: number;
190 readonly action: PullRequestAction;
191 readonly mergeMethod?: PullRequestMergeMethod;
192 }) => Effect.Effect<AzureDevOpsPullRequest | void, AzureDevOpsPullRequestCliError>;
193​
194 readonly updatePullRequest: (input: {
195 readonly cwd: string;
196 readonly number: number;
197 readonly title?: string | undefined;
198 readonly body?: string | undefined;
199 }) => Effect.Effect<void, AzureDevOpsPullRequestCliError>;
200​
201 readonly setPullRequestReviewers: (input: {
202 readonly cwd: string;
203 readonly number: number;
204 readonly reviewers: ReadonlyArray<string>;
205 readonly requested: boolean;
206 }) => Effect.Effect<void, AzureDevOpsPullRequestCliError>;
207 }
208>()("@t3tools/source-control-azure-devops/server/AzureDevOpsPullRequestCli") {}
209​
210function statusArgs(state: PullRequestListState): ReadonlyArray<string> {
211 switch (state) {
212 case "open":
213 return ["--status", "active"];
214 case "merged":
215 return ["--status", "completed"];
216 case "closed":
217 return ["--status", "abandoned"];
218 case "all":
219 return ["--status", "all"];
220 }
222​
223function involvementArgs(input: {
224 readonly involvement: PullRequestInvolvement;
225 readonly viewer: string;
226}): ReadonlyArray<string> {
227 switch (input.involvement) {
228 case "authored":
229 return ["--creator", input.viewer];
230 case "reviewing":
231 return ["--reviewer", input.viewer];
232 case "all":
233 return [];
234 }
236​
237function actionArgs(
238 action: PullRequestAction,
239 mergeMethod: PullRequestMergeMethod | undefined,
240): ReadonlyArray<string> {
241 switch (action) {
242 case "merge":
243 return ["--status", "completed", "--squash", mergeMethod === "squash" ? "true" : "false"];
244 case "enable-auto-merge":
245 return [
246 "--auto-complete",
247 "true",
248 ...(mergeMethod === undefined
249 ? []
250 : ["--squash", mergeMethod === "squash" ? "true" : "false"]),
251 ];
252 case "disable-auto-merge":
253 return ["--auto-complete", "false"];
254 case "ready":
255 return ["--draft", "false"];
256 case "draft":
257 return ["--draft", "true"];
258 case "close":
259 return ["--status", "abandoned"];
260 case "update-branch":
261 return [];
262 case "reopen":
263 return ["--status", "active"];
264 case "revert":
265 case "approve-workflows":
266 case "delete-branch":
267 throw new Error(`Azure DevOps pull request action ${action} is unsupported`);
268 }
270​
271function isReviewerName(value: string): boolean {
272 const name = value.trim();
273 return name.length > 0 && !name.startsWith("-");
275​
276/** @public */
277export const make = Effect.gen(function* () {
278 const azure = yield* AzureDevOpsCli.AzureDevOpsCli;
279​
280 // Let `az` parse all three remote formats.
281 const detectArgs = ["--detect", "true"] as const;
282​
283 const executeJson = (input: {
284 readonly cwd: string;
285 readonly args: ReadonlyArray<string>;
286 readonly maxOutputBytes?: number;
287 }) =>
288 azure.execute({
289 cwd: input.cwd,
290 args: [...input.args, "--only-show-errors", "--output", "json"],
291 ...(input.maxOutputBytes === undefined ? {} : { maxOutputBytes: input.maxOutputBytes }),
292 });
293​
294 /** Use the extension's credentials; `az rest` uses the default tenant. */
295 const invoke = <A>(input: {
296 readonly cwd: string;
297 readonly operation: string;
298 readonly resource: string;
299 readonly routeParameters: ReadonlyArray<string>;
300 readonly queryParameters?: ReadonlyArray<string>;
301 readonly maxOutputBytes?: number;
302 readonly decode: (raw: string) => Result.Result<A, unknown>;
303 }): Effect.Effect<A, AzureDevOpsPullRequestCliError> =>
304 executeJson({
305 cwd: input.cwd,
306 ...(input.maxOutputBytes === undefined ? {} : { maxOutputBytes: input.maxOutputBytes }),
307 args: [
308 "devops",
309 "invoke",
310 ...detectArgs,
311 "--area",
312 "git",
313 "--resource",
314 input.resource,
315 "--api-version",
316 REST_API_VERSION,
317 "--route-parameters",
318 ...input.routeParameters,
319 ...(input.queryParameters === undefined
320 ? []
321 : ["--query-parameters", ...input.queryParameters]),
322 ],
323 }).pipe(
324 Effect.flatMap((result) => {
325 const decoded = input.decode(result.stdout.trim());
326 return Result.isSuccess(decoded)
327 ? Effect.succeed(decoded.success)
328 : Effect.fail(
329 new AzureDevOpsPullRequestReadError({
330 command: "az",
331 cwd: input.cwd,
332 operation: input.operation,
333 cause: decoded.failure,
334 }),
335 );
336 }),
337 );
338​
339 /** Azure's items route requires a leading slash. */
340 const toItemPath = (path: string) => (path.startsWith("/") ? path : `/${path}`);
341​
342 const repositoryRoute = (location: AzureDevOpsRepositoryLocation): ReadonlyArray<string> => [
343 `project=${location.project}`,
344 `repositoryId=${location.repository}`,
345 ];
346​
347 const pullRequestRoute = (input: {
348 readonly location: AzureDevOpsRepositoryLocation;
349 readonly number: number;
350 }): ReadonlyArray<string> => [
351 ...repositoryRoute(input.location),
352 `pullRequestId=${input.number}`,
353 ];
354​
355 /** Decoding can shorten a non-final page; advance by raw rows. */
356 const listPullRequestPage = (input: {
357 readonly cwd: string;
358 readonly repository: string;
359 readonly state: PullRequestListState;
360 readonly involvement: PullRequestInvolvement;
361 readonly viewer: string;
362 readonly author?: string | undefined;
363 readonly limit: number;
364 readonly skip: number;
365 readonly cursorAdvance: number;
366 readonly items: ReadonlyArray<AzureDevOpsPullRequest>;
367 }): Effect.Effect<
368 {
369 readonly items: ReadonlyArray<AzureDevOpsPullRequest>;
370 readonly truncated: boolean;
371 readonly cursorAdvance: number;
372 },
373 AzureDevOpsPullRequestCliError
374 > => {
375 const remaining = input.limit - input.items.length;
376 const top = remaining + 1;
377 return executeJson({
378 cwd: input.cwd,
379 maxOutputBytes: PULL_REQUEST_LIST_MAX_OUTPUT_BYTES,
380 args: [
381 "repos",
382 "pr",
383 "list",
384 ...detectArgs,
385 "--repository",
386 input.repository,
387 ...statusArgs(input.state),
388 ...involvementArgs(input),
389 ...(input.author === undefined || input.involvement === "authored"
390 ? []
391 : ["--creator", input.author]),
392 "--include-links",
393 ...(input.skip === 0 ? [] : ["--skip", String(input.skip)]),
394 "--top",
395 String(top),
396 ],
397 }).pipe(
398 Effect.flatMap((result) => {
399 const raw = result.stdout.trim();
400 if (raw.length === 0) {
401 return Effect.succeed({
402 items: input.items,
403 truncated: false,
404 cursorAdvance: input.cursorAdvance,
405 });
406 }
407 const decoded = decodePullRequestListJson(raw);
408 if (!Result.isSuccess(decoded)) {
409 return Effect.fail(
410 new AzureDevOpsPullRequestReadError({
411 command: "az",
412 cwd: input.cwd,
413 operation: "listPullRequests",
414 cause: decoded.failure,
415 }),
416 );
417 }
418​
419 const lastItemIndex = decoded.success.rawIndexes[remaining - 1];
420 if (lastItemIndex !== undefined) {
421 const consumed = lastItemIndex + 1;
422 return Effect.succeed({
423 items: [...input.items, ...decoded.success.items.slice(0, remaining)],
424 truncated: consumed < decoded.success.rawCount || decoded.success.rawCount === top,
425 cursorAdvance: input.cursorAdvance + consumed,
426 });
427 }
428​
429 const items = [...input.items, ...decoded.success.items];
430 if (decoded.success.rawCount < top) {
431 return Effect.succeed({
432 items,
433 truncated: false,
434 cursorAdvance: input.cursorAdvance + decoded.success.rawCount,
435 });
436 }
437 return listPullRequestPage({
438 ...input,
439 skip: input.skip + decoded.success.rawCount,
440 cursorAdvance: input.cursorAdvance + decoded.success.rawCount,
441 items,
442 });
443 }),
444 );
445 };
446​
447 return AzureDevOpsPullRequestCli.of({
448 getViewer: Effect.fn("AzureDevOpsPullRequestCli.getViewer")(function (input) {
449 return executeJson({ cwd: input.cwd, args: ["account", "show", "--query", "user"] }).pipe(
450 Effect.flatMap((result): Effect.Effect<string, AzureDevOpsPullRequestCliError> => {
451 const decoded = decodeViewerJson(`{"user":${result.stdout.trim() || "null"}}`);
452 if (!Result.isSuccess(decoded)) {
453 return Effect.fail(
454 new AzureDevOpsPullRequestReadError({
455 command: "az",
456 cwd: input.cwd,
457 operation: "getViewer",
458 cause: decoded.failure,
459 }),
460 );
461 }
462 return decoded.success === null
463 ? Effect.fail(new AzureDevOpsViewerUnavailableError({ command: "az", cwd: input.cwd }))
464 : Effect.succeed(decoded.success);
465 }),
466 // `az account show` cannot identify PAT logins; the extension resolves `--creator me`.
467 Effect.catchIf(
468 (error) => error._tag !== "AzureDevOpsCliUnavailableError",
469 () =>
470 executeJson({
471 cwd: input.cwd,
472 args: [
473 "repos",
474 "pr",
475 "list",
476 ...detectArgs,
477 "--creator",
478 "me",
479 "--status",
480 "all",
481 "--top",
482 "1",
483 ],
484 }).pipe(
485 Effect.flatMap((result): Effect.Effect<string, AzureDevOpsPullRequestCliError> => {
486 const decoded = decodePullRequestListJson(result.stdout.trim() || "[]");
487 const login = Result.isSuccess(decoded)
488 ? decoded.success.items[0]?.author?.login
489 : undefined;
490 return login === undefined
491 ? Effect.fail(
492 new AzureDevOpsViewerUnavailableError({ command: "az", cwd: input.cwd }),
493 )
494 : Effect.succeed(login);
495 }),
496 ),
497 ),
498 );
499 }),
500​
501 listPullRequests: Effect.fn("AzureDevOpsPullRequestCli.listPullRequests")(function (input) {
502 return listPullRequestPage({
503 cwd: input.cwd,
504 repository: input.repository,
505 state: input.state,
506 involvement: input.involvement,
507 viewer: input.viewer,
508 author: input.author,
509 limit: input.limit,
510 skip: input.cursor?.delivered ?? 0,
511 cursorAdvance: 0,
512 items: [],
513 });
514 }),
515​
516 getPullRequest: Effect.fn("AzureDevOpsPullRequestCli.getPullRequest")(function (input) {
517 return executeJson({
518 cwd: input.cwd,
519 args: ["repos", "pr", "show", ...detectArgs, "--id", String(input.number)],
520 }).pipe(
521 Effect.flatMap(
522 (result): Effect.Effect<AzureDevOpsPullRequest, AzureDevOpsPullRequestCliError> => {
523 const decoded = decodePullRequestJson(result.stdout.trim());
524 if (!Result.isSuccess(decoded)) {
525 return Effect.fail(
526 new AzureDevOpsPullRequestReadError({
527 command: "az",
528 cwd: input.cwd,
529 operation: "getPullRequest",
530 cause: decoded.failure,
531 }),
532 );
533 }
534 return decoded.success === null
535 ? Effect.fail(
536 new AzureDevOpsPullRequestIncompleteError({
537 command: "az",
538 cwd: input.cwd,
539 number: input.number,
540 }),
541 )
542 : Effect.succeed(decoded.success);
543 },
544 ),
545 );
546 }),
547​
548 listThreads: Effect.fn("AzureDevOpsPullRequestCli.listThreads")(function (input) {
549 return invoke({
550 cwd: input.cwd,
551 operation: "listThreads",
552 resource: "pullRequestThreads",
553 routeParameters: pullRequestRoute(input),
554 maxOutputBytes: REVIEW_HISTORY_MAX_OUTPUT_BYTES,
555 decode: decodeThreadsJson,
556 });
557 }),
558​
559 listIterations: Effect.fn("AzureDevOpsPullRequestCli.listIterations")(function (input) {
560 return invoke({
561 cwd: input.cwd,
562 operation: "listIterations",
563 resource: "pullRequestIterations",
564 routeParameters: pullRequestRoute(input),
565 maxOutputBytes: REVIEW_HISTORY_MAX_OUTPUT_BYTES,
566 decode: decodeIterationsJson,
567 });
568 }),
569​
570 listIterationChanges: Effect.fn("AzureDevOpsPullRequestCli.listIterationChanges")(
571 function (input) {
572 const page = (skip: number) =>
573 invoke({
574 cwd: input.cwd,
575 operation: "listIterationChanges",
576 resource: "pullRequestIterationChanges",
577 routeParameters: [...pullRequestRoute(input), `iterationId=${input.iterationId}`],
578 queryParameters: [`$top=${CHANGE_ENTRIES_PER_PAGE}`, `$skip=${skip}`],
579 maxOutputBytes: CHANGE_ENTRIES_MAX_OUTPUT_BYTES,
580 decode: decodeIterationChangesJson,
581 });
582 const from = (
583 skip: number,
584 collected: ReadonlyArray<AzureDevOpsChangeEntry>,
585 ): Effect.Effect<AzureDevOpsIterationChanges, AzureDevOpsPullRequestCliError> =>
586 page(skip).pipe(
587 Effect.flatMap((answer) => {
588 const changes = [...collected, ...answer.changes];
589 if (answer.nextSkip === null) return Effect.succeed({ changes, truncated: false });
590 return answer.nextSkip <= skip || answer.nextSkip >= MAX_CHANGE_ENTRIES
591 ? Effect.succeed({ changes, truncated: true })
592 : from(answer.nextSkip, changes);
593 }),
594 );
595 return from(0, []);
596 },
597 ),
598​
599 readItemContent: Effect.fn("AzureDevOpsPullRequestCli.readItemContent")(function (input) {
600 return invoke({
601 cwd: input.cwd,
602 operation: "readItemContent",
603 resource: "items",
604 routeParameters: repositoryRoute(input.location),
605 queryParameters: [
606 // `az devops invoke` does not escape query values, so `#` or `&` in a path would truncate it.
607 `path=${encodeURIComponent(toItemPath(input.path))}`,
608 "versionDescriptor.versionType=commit",
609 `versionDescriptor.version=${input.commit}`,
610 "includeContent=true",
611 // Encoded content cannot identify binaries; request Azure's binary flag.
612 "includeContentMetadata=true",
613 // `az devops invoke` requires JSON; otherwise Azure returns raw file bytes.
614 "$format=json",
615 ],
616 maxOutputBytes: ITEM_CONTENT_MAX_OUTPUT_BYTES,
617 decode: decodeItemContentJson,
618 });
619 }),
620​
621 setPullRequestReviewers: Effect.fn("AzureDevOpsPullRequestCli.setPullRequestReviewers")(
622 function* (input) {
623 if (input.reviewers.some((reviewer) => !isReviewerName(reviewer))) {
624 return yield* new AzureDevOpsReviewerNameError({ command: "az", cwd: input.cwd });
625 }
626 return yield* azure
627 .execute({
628 cwd: input.cwd,
629 args: [
630 "repos",
631 "pr",
632 "reviewer",
633 input.requested ? "add" : "remove",
634 ...detectArgs,
635 "--id",
636 String(input.number),
637 // Repeating `--reviewers` replaces the earlier list.
638 "--reviewers",
639 ...input.reviewers,
640 "--only-show-errors",
641 "--output",
642 "json",
643 ],
644 })
645 .pipe(Effect.asVoid);
646 },
647 ),
648​
649 runPullRequestAction: Effect.fn("AzureDevOpsPullRequestCli.runPullRequestAction")(
650 function (input) {
651 return azure
652 .execute({
653 cwd: input.cwd,
654 args: [
655 "repos",
656 "pr",
657 "update",
658 ...detectArgs,
659 "--id",
660 String(input.number),
661 ...actionArgs(input.action, input.mergeMethod),
662 "--only-show-errors",
663 "--output",
664 "json",
665 ],
666 })
667 .pipe(
668 // `pr update` prints the pull request it left, in the shape `pr show` prints.
669 Effect.map((result) => {
670 const decoded = decodePullRequestJson(result.stdout.trim());
671 return Result.isSuccess(decoded) ? (decoded.success ?? undefined) : undefined;
672 }),
673 );
674 },
675 ),
676​
677 updatePullRequest: Effect.fn("AzureDevOpsPullRequestCli.updatePullRequest")(function (input) {
678 return azure
679 .execute({
680 cwd: input.cwd,
681 args: [
682 "repos",
683 "pr",
684 "update",
685 ...detectArgs,
686 "--id",
687 String(input.number),
688 // One argv entry preserves leading dashes and multi-string descriptions.
689 ...(input.title === undefined ? [] : [`--title=${input.title}`]),
690 ...(input.body === undefined ? [] : [`--description=${input.body}`]),
691 "--only-show-errors",
692 "--output",
693 "json",
694 ],
695 })
696 .pipe(Effect.asVoid);
697 }),
698 });
699});
700​
701export const layer = Layer.effect(AzureDevOpsPullRequestCli, make);