diff --git a/.travis.yml b/.travis.yml index 5b9084303..398a921bb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -67,7 +67,7 @@ matrix: source/platforms/git/_tests/local_dangerfile_example.ts || echo "Skipping Danger Local for non PR run"' # Create some fake projects at runtime - - node_js: "8" + - node_js: "10.16" script: - echo "This is only for Integration tests on two blank projects" - yarn build diff --git a/CHANGELOG.md b/CHANGELOG.md index 9625ac9b6..3458e15b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,9 @@ - Added flag to bypass Jira/Issues - [@orieken] - Improve docs for GitHub Actions - [@nguyenhuy] + + + # 9.1.8 - Get GitHub Actions event file pathname from env variable - [@IljaDaderko] diff --git a/dangerfile.ts b/dangerfile.ts index df2b88209..bad944599 100644 --- a/dangerfile.ts +++ b/dangerfile.ts @@ -38,6 +38,12 @@ export default async () => { // Some libraries await yarn() await jest() + + // Don't have folks setting the package json version + const packageDiff = await danger.git.JSONDiffForFile("package.json") + if (packageDiff.version && danger.github.pr.user.login !== "orta") { + fail("Please don't make package version changes") + } } // Re-run the git push hooks