How to use circleci-api - 2 common examples

To help you get started, we’ve selected a few circleci-api 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 artsy / dupe-report / packages / dupe-report / src / api / circle.ts View on Github external
// Configure the factory with some defaults
    const options: CircleCIOptions = {
      // Required for all requests
      token: CIRCLE_TOKEN, // Set your CircleCi API token

      // Git information is required for project/build/etc endpoints
      vcs: {
        type: GitType.GITHUB, // default: github
        owner,
        repo
      }
    };

    // Create the api object
    this.api = new CircleCI(options);
  }
github artsy / dupe-report / packages / dupe-report / src / api / circle.ts View on Github external
constructor({ owner, repo }: { owner: string; repo: string }) {
    this.owner = owner;
    this.repo = repo;

    // Configure the factory with some defaults
    const options: CircleCIOptions = {
      // Required for all requests
      token: CIRCLE_TOKEN, // Set your CircleCi API token

      // Git information is required for project/build/etc endpoints
      vcs: {
        type: GitType.GITHUB, // default: github
        owner,
        repo
      }
    };

    // Create the api object
    this.api = new CircleCI(options);
  }

circleci-api

A Node and Browser client for the CircleCI API, written in TypeScript.

MIT
Latest version published 4 years ago

Package Health Score

52 / 100
Full package analysis