GitFOSS
.ts
TypeScript
(application/typescript)
// 1st-party
import { makeService } from "@ethicdevs/react-monolith";
// service types
import type { PullRequestServiceDeps, PullRequestServiceAPI } from "./types";
// service methods
import { default as makeGetPullRequestById } from "./getPullRequestById";
import { default as makeGetPullRequestByUid } from "./getPullRequestByUid";
import { default as makeGetPullRequestsInRepository } from "./getPullRequestsInRepository";
import { default as makeCreatePullRequest } from "./createPullRequest";
import { default as makeMergePullRequest } from "./mergePullRequest";

export const makePullRequestService = makeService<
  PullRequestServiceAPI,
  PullRequestServiceDeps
>({
  getPullRequestById: makeGetPullRequestById,
  getPullRequestByUid: makeGetPullRequestByUid,
  getPullRequestsInRepository: makeGetPullRequestsInRepository,
  createPullRequest: makeCreatePullRequest,
  mergePullRequest: makeMergePullRequest,
});