23 lines · 991 B · TypeScript
RawDownload
import { AuthOrchestrationReadScope, EnvironmentHttpApi } from "@t3tools/contracts";import * as Effect from "effect/Effect";import * as HttpApiBuilder from "effect/unstable/httpapi/HttpApiBuilder"; import { annotateEnvironmentRequest, requireEnvironmentScope } from "../auth/http.ts";import * as PullRequestService from "./PullRequestService.ts"; /** The patch is often the largest PR payload and benefits from HTTP compression and flow control. */export const pullRequestHttpApiLayer = HttpApiBuilder.group(  EnvironmentHttpApi,  "pullRequests",  Effect.fnUntraced(function* (handlers) {    const pullRequests = yield* PullRequestService.PullRequestService;    return handlers.handle(      "diff",      Effect.fn("environment.pullRequests.diff")(function* (args) {        yield* annotateEnvironmentRequest(args.endpoint.name);        yield* requireEnvironmentScope(AuthOrchestrationReadScope);        return yield* pullRequests.diff(args.payload);      }),    );  }),);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t