How to use the circleci-api.GitType.GITHUB function in circleci-api

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
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 3 years ago

Package Health Score

45 / 100
Full package analysis