Skip to content

Commit

Permalink
Merged by Peril
Browse files Browse the repository at this point in the history
Adds an option to skip the checks API when using peril
  • Loading branch information
peril-staging[bot] committed Aug 16, 2018
2 parents c1d6893 + c1421bf commit 15569a4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion source/danger/peril_platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import {
import { Platform } from "danger/distribution/platforms/platform"
import { RunType } from "./danger_run"

const { SKIP_CHECKS_SUPPORT } = process.env

/**
* When Peril is running a dangerfile for a PR we can use the default GitHub from Danger
* however, an event like an issue comment or a user creation has no way to provide any kind of
Expand Down Expand Up @@ -37,7 +39,9 @@ export const getPerilPlatformForDSL = (type: RunType, github: GitHubType | null,
getFileContents: github ? github.getFileContents.bind(github) : nullFunc,
// Checks Support
platformResultsPreMapper: () =>
github ? github.platformResultsPreMapper && github.platformResultsPreMapper.bind(github) : nullFunc,
github
? !SKIP_CHECKS_SUPPORT && github.platformResultsPreMapper && github.platformResultsPreMapper.bind(github)
: nullFunc,

// deprecated, and not used to my knowledge
handlePostingResults: () =>
Expand Down

0 comments on commit 15569a4

Please sign in to comment.