How to use the @auto-it/core function in @auto-it/core

To help you get started, we’ve selected a few @auto-it/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github intuit / auto / packages / cli / src / run.ts View on Github external
export async function run(command: string, args: ApiOptions) {
  const auto = new Auto(args);

  switch (command) {
    case 'init':
      await auto.init(args as IInitOptions);
      break;
    case 'create-labels':
      await auto.loadConfig();
      await auto.createLabels(args as ICreateLabelsOptions);
      break;
    case 'label':
      await auto.loadConfig();
      await auto.label(args as ILabelOptions);
      break;
    case 'pr-check':
      await auto.loadConfig();
      await auto.prCheck(args as IPRCheckOptions);