Skip to content

Commit

Permalink
Merge pull request #916 from danger/fix_ci
Browse files Browse the repository at this point in the history
Blocks PRs which change the package version, and fixes CI
  • Loading branch information
orta committed Sep 7, 2019
2 parents 58ec25f + d6873a9 commit f30f9d0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -15,6 +15,8 @@

<!-- Your comment below this -->

<!-- Your comment above this -->

- Improve docs for GitHub Actions - [@nguyenhuy]

# 9.1.8
Expand Down
6 changes: 6 additions & 0 deletions dangerfile.ts
Expand Up @@ -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
Expand Down

0 comments on commit f30f9d0

Please sign in to comment.