Skip to content

Commit

Permalink
Blocks PRs which change the package version, and moves the integratio…
Browse files Browse the repository at this point in the history
…n tests to node 10 now that the github package has a minimum of 10
  • Loading branch information
orta committed Sep 7, 2019
1 parent 5ea8884 commit fafd24c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
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.12"
script:
- echo "This is only for Integration tests on two blank projects"
- yarn build
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@

## Master

<!-- Your comment below this -->
<!-- Your comment between this -->

<!-- Your comment above this -->

# 9.1.4

Expand Down
6 changes: 6 additions & 0 deletions dangerfile.ts
Original file line number Diff line number Diff line change
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 fafd24c

Please sign in to comment.