How to use the spektate/lib/repository/GitHub.GitHub function in spektate

To help you get started, we’ve selected a few spektate 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 microsoft / spektate / src / Dashboard.tsx View on Github external
: config.AZURE_PIPELINE_ACCESS_TOKEN
    );
    const hldPipeline = new AzureDevOpsPipeline(
      config.AZURE_ORG,
      config.AZURE_PROJECT,
      true,
      config.AZURE_PIPELINE_ACCESS_TOKEN
    );
    const clusterPipeline = new AzureDevOpsPipeline(
      config.AZURE_ORG,
      config.AZURE_PROJECT,
      false,
      config.AZURE_PIPELINE_ACCESS_TOKEN
    );
    if (config.MANIFEST && config.GITHUB_MANIFEST_USERNAME) {
      const manifestRepo: IRepository = new GitHub(
        config.GITHUB_MANIFEST_USERNAME,
        config.MANIFEST,
        config.MANIFEST_ACCESS_TOKEN
      );
      // const manifestRepo: Repository = new AzureDevOpsRepo(config.AZURE_ORG, config.AZURE_PROJECT, config.MANIFEST, config.MANIFEST_ACCESS_TOKEN);
      manifestRepo.getManifestSyncState().then((syncCommits: any) => {
        this.setState({ manifestSyncStatuses: syncCommits });
      });
    } else if (config.MANIFEST) {
      const manifestRepo: IRepository = new AzureDevOpsRepo(
        config.AZURE_ORG,
        config.AZURE_PROJECT,
        config.MANIFEST,
        config.AZURE_PIPELINE_ACCESS_TOKEN
      );
      manifestRepo.getManifestSyncState().then((syncCommit: any) => {
github microsoft / spektate / src / cli / AccessHelper.ts View on Github external
public static getClusterSync = (callback?: (syncTag: ITag) => void): void => {
    const manifestRepo: IRepository = new GitHub(
      config.GITHUB_MANIFEST_USERNAME,
      config.MANIFEST,
      config.MANIFEST_ACCESS_TOKEN
    );
    manifestRepo.getManifestSyncState().then(syncTag => {
      if (callback) {
        callback(syncTag);
      }
    });
  };