How to use the danger/distribution/runner/Executor.Executor function in danger

To help you get started, we’ve selected a few danger 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 danger / peril / api / source / danger / danger_runner.ts View on Github external
export function executorForInstallation(platform: Platform, runner: DangerRunner, options: GitHubInstallationSettings) {
  // We need this for things like repo slugs, PR IDs etc
  // https://github.com/danger/danger-js/blob/master/source/ci_source/ci_source.js

  const config: ExecutorOptions = {
    dangerID: "Peril", // TODO: multiple Peril runs?
    jsonOnly: false,
    stdoutOnly: false,
    verbose: !!process.env.LOG_FETCH_REQUESTS,
    disableGitHubChecksSupport: options.disable_github_check,
    passURLForDSL: false,
  }

  // Source can be removed in the next release of Danger
  return new Executor(source, platform, runner, config, process)
}