forked from mbman/react
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dangerfile.ts
16 lines (14 loc) · 815 Bytes
/
dangerfile.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import { danger, fail, warn, markdown } from 'danger'
import checkChangelog from './build/dangerjs/checkChangelog'
import detectChangedDependencies from './build/dangerjs/detectChangedDependencies'
import detectNonApprovedDependencies from './build/dangerjs/detectNonApprovedDependencies'
/**
* This trick (of explicitly passing Danger JS utils as function arg, instead of importing them at places where needed)
* is necessary due to the magic DangerJS is doing with imports: https://spectrum.chat/danger/javascript/danger-js-actually-runs-your-imports-as-globals~0a005b56-31ec-4919-9a28-ced623949d4d
*/
const dangerJS = { danger, fail, warn, markdown }
export default async () => {
await checkChangelog(dangerJS)
await detectChangedDependencies(dangerJS)
await detectNonApprovedDependencies(dangerJS)
}