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 efe5eb3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@

<!-- Your comment below this -->

<!-- Your comment above this -->

# 9.1.4

- Use new env `BITBUCKET_REPO_FULL_NAME` in bitbucket pipeline. - [@Soyn]
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 efe5eb3

Please sign in to comment.