gitfoss | 19e345f2aad3515b33b9c6eef8d29ba884178fe0 | app/services/pipelines/triggerRunner.ts ∙ GitFOSS
.ts
TypeScript
(application/typescript)
// 1st-party
import type { ServiceMethodFactory } from "@ethicdevs/react-monolith";
import type { PipelineServiceDeps } from "./types";

const makeTriggerRunner: ServiceMethodFactory<
  PipelineServiceDeps,
  [string, string, string],
  Promise<any>
> = ({ runner }) => {
  return async (orgSlug: string, repoSlug: string, pipelineId: string) => {
    return runner.triggerRun(orgSlug, repoSlug, pipelineId);
  };
};

export default makeTriggerRunner;