gitfoss | 9cec23485bd304126f7b1dd2f0d9398e90fc96b2 | 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;