Jest implementation to get danger.js to work.

This commit is contained in:
Michael Teeuw
2018-01-25 19:43:09 +01:00
parent 584786eb9f
commit 22e2fdc707
5 changed files with 3495 additions and 8 deletions

View File

@@ -1,8 +1,9 @@
import { message, danger } from "danger"
import { includes } from "lodash"
// Add a CHANGELOG entry for app changes
const hasChangelog = includes(danger.git.modified_files, "CHANGELOG.md")
if (!hasChangelog) {
const isTrivial = contains((danger.github.pr.body + danger.github.pr.title), "#trivial")
if (!hasChangelog && !isTrivial) {
warn("Please add a `CHANGELOG.md` entry for your changes.")
}